Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/xwt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKunyi Li <55105630+kunyli@users.noreply.github.com>2022-03-26 02:34:17 +0300
committerGitHub <noreply@github.com>2022-03-26 02:34:17 +0300
commit13d7a18c5bbc6f882a1850dfa7afb05ee643aa6a (patch)
treec54536f6c78add615a17af30561efe55ef5cc8fd
parent9bad871dd2ac47f48dbf25a67c023aaa52033f56 (diff)
Fixed changed handler to detect password autofilled using Apple Keychain and text field wrapping to prevent long passwords appearing as multiple lines (#1098)
-rw-r--r--Xwt.XamMac/Xwt.Mac/PasswordEntryBackend.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/Xwt.XamMac/Xwt.Mac/PasswordEntryBackend.cs b/Xwt.XamMac/Xwt.Mac/PasswordEntryBackend.cs
index 5e1a74a5..fe25c64c 100644
--- a/Xwt.XamMac/Xwt.Mac/PasswordEntryBackend.cs
+++ b/Xwt.XamMac/Xwt.Mac/PasswordEntryBackend.cs
@@ -40,7 +40,12 @@ namespace Xwt.Mac
public override void Initialize ()
{
base.Initialize ();
+
var view = new CustomSecureTextField (EventSink, ApplicationContext);
+ view.Cell.UsesSingleLineMode = true;
+ view.Cell.Scrollable = true;
+ view.Cell.Wraps = false;
+
ViewObject = new CustomAlignedContainer (EventSink, ApplicationContext, (NSView)view) { DrawsBackground = false };
}
@@ -109,6 +114,7 @@ namespace Xwt.Mac
this.context = context;
this.eventSink = eventSink;
Activated += (sender, e) => context.InvokeUserCode (eventSink.OnActivated);
+ Changed += (sender, e) => context.InvokeUserCode (eventSink.OnChanged);
}
public NSView View {
@@ -118,12 +124,6 @@ namespace Xwt.Mac
}
public ViewBackend Backend { get; set; }
-
- public override void DidChange (NSNotification notification)
- {
- base.DidChange (notification);
- context.InvokeUserCode (eventSink.OnChanged);
- }
}
}