diff --git a/src/main.rs b/src/main.rs index 3fb721d..1683240 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,7 +17,6 @@ fn main() -> Result<(), slint::PlatformError> { slint::spawn_local(async move { sleep(Duration::from_secs(5)); weak_window.upgrade_in_event_loop(move |ui| { - println!("Goodbye!"); ui.set_text("GoodBye!".into()); }) }) diff --git a/ui/main.slint b/ui/main.slint index 7ab00d0..db68f9d 100644 --- a/ui/main.slint +++ b/ui/main.slint @@ -10,12 +10,62 @@ export component MainWindow inherits Window { preferred-width: 1024px; preferred-height: 600px; + in-out property current-page: 0; in property text: "Hello World"; + in property next-event-label: "NEXT EVENT"; + in property next-event-title: "LOADING CALENDAR"; + in property next-event-time: "--"; - callback set-label(string); + callback user-activity(); + + Rectangle { + x: 0; + y: 0; + width: parent.width; + height: 5px; + background: black; + } + + TouchArea { + x: 0; + y: 5px; + width: parent.width - 78px; + height: 78px; + clicked => { root.user-activity(); root.current-page = 2; } + } Text { - text: text; + x: 38px; + y: 12px; + width: parent.width - 128px; + height: 18px; + text: root.next-event-label; + font-size: 14px; + font-weight: 700; + } + + Text { + x: 38px; + y: 32px; + width: 390px; + height: 36px; + text: root.next-event-title; + font-size: 22px; + font-weight: 700; + overflow: elide; + vertical-alignment: center; + } + + Text { + x: 438px; + y: 32px; + width: 100px; + height: 36px; + text: root.next-event-time; + font-size: 18px; + font-weight: 700; + horizontal-alignment: right; + vertical-alignment: center; } }