Skip to content

Commit

Permalink
Merge pull request #11669 from unoplatform/mergify/bp/release/stable/…
Browse files Browse the repository at this point in the history
…4.8/pr-11646

fix: Overlay input on GTK regressions (backport #11646 and #11663)
  • Loading branch information
jeromelaban authored Mar 13, 2023
2 parents 67b126d + 3cfdafd commit a19160f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ namespace Uno.UI.Runtime.Skia.UI.Xaml.Controls;

internal abstract class GtkTextBoxView : IOverlayTextBoxView
{
private const string TextBoxViewCssClass = "textboxview";

private static bool _warnedAboutSelectionColorChanges;

private readonly string _textBoxViewId = Guid.NewGuid().ToString();
Expand All @@ -28,6 +30,8 @@ internal abstract class GtkTextBoxView : IOverlayTextBoxView

protected GtkTextBoxView()
{
// Applies themes from Theming/UnoGtk.css
InputWidget.StyleContext.AddClass(TextBoxViewCssClass);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public void StartEntry()

_textBoxView!.AddToTextInputLayer(xamlRoot);
InvalidateLayout();

SetPasswordRevealState(_currentPasswordRevealState);

_textBoxView.SetFocus();
Expand Down Expand Up @@ -164,8 +165,11 @@ public void UpdatePosition()

public void SetPasswordRevealState(PasswordRevealState revealState)
{
_textBoxView?.SetPasswordRevealState(revealState);
_currentPasswordRevealState = revealState;
if (_owner.TextBox is PasswordBox)
{
_textBoxView?.SetPasswordRevealState(revealState);
_currentPasswordRevealState = revealState;
}
}

public void Select(int start, int length)
Expand Down

0 comments on commit a19160f

Please sign in to comment.