diff --git a/src/main.rs b/src/main.rs index 7aa41f4..b9e9a11 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,3 +13,4 @@ fn main() -> Result<(), slint::PlatformError> { ui.run() } + \ No newline at end of file diff --git a/ui/appwindow.slint b/ui/appwindow.slint index dc62d88..4a56fc4 100644 --- a/ui/appwindow.slint +++ b/ui/appwindow.slint @@ -1,19 +1,48 @@ -import { Button, VerticalBox } from "std-widgets.slint"; +import { Button, VerticalBox, GridBox, LineEdit } from "std-widgets.slint"; export component AppWindow inherits Window { in-out property counter: 42; callback request-increase-value(); - VerticalBox { - Text { - text: "Counter: \{root.counter}"; + + background: #313e50; + + GridBox { + spacing: 25px; + padding: 50px; + Row { + Text { + text: "Calculator"; + horizontal-alignment: center; + font-size: 20px; + font-weight: 900; + color: #ffffff; + } + } + + Row{ + LineEdit { + placeholder-text: "Enter value"; + font-size: 16px; + height: 35px; + } + } + + Row { + Button { + text: "Increase value"; + clicked => { + root.request-increase-value(); + } + height: 35px; + primary: true; + } } - Button { - text: "Increase value"; - clicked => { - root.request-increase-value(); + Row { + Text { + text: "Counter: \{root.counter}"; + color: #a3a1dd; } - height: 35px; } } }