mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-03 01:33:19 +00:00
Ui changes, remove unused buttons
This commit is contained in:
parent
36a2fe9220
commit
e28ba796cd
53 changed files with 133 additions and 27125 deletions
16
external/slint-vynui/TextInput.slint
vendored
16
external/slint-vynui/TextInput.slint
vendored
|
@ -8,6 +8,15 @@ export component VTextInput inherits VLabeledComponent {
|
|||
in-out property placeholder <=> textInputComponent.accessible-placeholder-text;
|
||||
in-out property wrap <=> textInputComponent.wrap;
|
||||
callback accepted();
|
||||
callback edited();
|
||||
callback started-writting();
|
||||
|
||||
public function edit-text(text: string) {
|
||||
root.text = text;
|
||||
root.old-text = text;
|
||||
}
|
||||
|
||||
private property <string> old-text: "";
|
||||
|
||||
VerticalLayout {
|
||||
padding: 4px;
|
||||
|
@ -16,6 +25,13 @@ export component VTextInput inherits VLabeledComponent {
|
|||
textInputComponent := TextInput {
|
||||
color: Palette.foreground;
|
||||
accepted => { root.accepted() }
|
||||
edited => {
|
||||
root.edited();
|
||||
if (textInputComponent.text != "" && old-text == "") {
|
||||
root.started-writting();
|
||||
}
|
||||
old-text = textInputComponent.text;
|
||||
}
|
||||
HorizontalLayout {
|
||||
alignment: start;
|
||||
VText {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue