Make inputting nicer
This commit is contained in:
1 parent
de3383efdb
commit
4b3b8f4fe5
1 file changed
+11
-1
+11
-1
@@ -114,6 +114,12 @@ component AddView inherits VerticalLayout {
|
||||
height: 42px;
|
||||
input := LineEdit {
|
||||
font-size: 20px;
|
||||
accepted(text) => {
|
||||
if text != "" {
|
||||
State.add-to-list(text);
|
||||
input.text = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
@@ -124,7 +130,11 @@ component AddView inherits VerticalLayout {
|
||||
width: self.height;
|
||||
text: "+";
|
||||
clicked => {
|
||||
State.add-to-list(input.text);
|
||||
if input.text != "" {
|
||||
State.add-to-list(input.text);
|
||||
input.text = "";
|
||||
}
|
||||
input.clear-focus()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user