diff --git a/gui/ui/app.slint b/gui/ui/app.slint index 9040d2a..e15d862 100644 --- a/gui/ui/app.slint +++ b/gui/ui/app.slint @@ -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() } } }