Many imorovments
This commit is contained in:
@@ -528,6 +528,9 @@ export component Panel inherits Rectangle {
|
||||
export component Field inherits Rectangle {
|
||||
in-out property <string> text;
|
||||
in property <string> placeholder;
|
||||
/// Masks the entry, for a credential that should not be readable over the
|
||||
/// user's shoulder. The placeholder still shows while the field is empty.
|
||||
in property <bool> secret: false;
|
||||
/// Whether the entry currently holds focus, so a caller can enable its
|
||||
/// submit button from the same fact the border is drawn from.
|
||||
out property <bool> has-focus: input.has-focus;
|
||||
@@ -552,6 +555,7 @@ export component Field inherits Rectangle {
|
||||
width: parent.width - 2 * Theme.gap;
|
||||
height: 100%;
|
||||
single-line: true;
|
||||
input-type: root.secret ? InputType.password : InputType.text;
|
||||
accepted => { root.accepted(self.text); }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user