Conversation
|
This might help fix the WinUI issue; (it’s what I did to fix a basically identical issue with TextField widgets) |
|
That works, thanks! (I just replaced |
|
Looks like you need to add default implementations to AppBackend to satisfy the CI (and implement DummyBackend support) |
stackotter
left a comment
There was a problem hiding this comment.
I haven't reviewed the backend code because it'll probably change as a result of this set of comments; just focussed on the common SCUI implementation.
| /// | ||
| /// - Returns: A text field. | ||
| func createTextField() -> Widget | ||
| func createTextField(secure: Bool) -> Widget |
There was a problem hiding this comment.
Given that many backends have to use separate underlying widget types, and the API is used to back a different SwiftCrossUI view, I believe that it'd be best to make separate createSecureTextField and updateSecureTextField methods. Backends such as GtkBackend that don't need specical secure handling can then use just defer to their existing createTextField and updateTextField implementations.
| } | ||
|
|
||
| /// A control that displays an editable text interface. | ||
| public struct TextField: TextFieldProtocol { |
There was a problem hiding this comment.
Move this type to its own file
| } | ||
|
|
||
| /// A control that displays an editable text interface with hidden input. | ||
| public struct SecureField: TextFieldProtocol { |
There was a problem hiding this comment.
Move this type to its own file as well
This PR adds
SecureField, which is simplyTextFieldbut everything shows up as a dot. Implemented and working on all backends. (There is a quirk on WinUIBackend where the field doesn’t show up until the first rerender -- I have absolutely no idea where this bug could be coming from and so I’m saving it for Later™.)Resolves #247.