From b47c640ad02e67a9ca7003286d383c3cc2ac64f7 Mon Sep 17 00:00:00 2001 From: Avii Date: Thu, 6 Aug 2026 14:20:42 +0200 Subject: [PATCH] 1786018842 --- src/main.rs | 52 --------------------------------------------------- ui/main.slint | 1 + 2 files changed, 1 insertion(+), 52 deletions(-) diff --git a/src/main.rs b/src/main.rs index c08a9d8..6fe9ee3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,56 +17,4 @@ fn main() -> Result<(), slint::PlatformError> { }); ui.run() - - // let red = (255, 0, 0, 255); - // let green = (0, 255, 0, 255); - // let blue = (0, 0, 255, 255); - - // // /dev/input/event4: silead_ts - - // Rectangle::new(Point::new(0, 0), Size::new(trekstor.screen.width(), 1)) - // .into_styled(PrimitiveStyle::with_fill(Rgba::from(red))) - // .draw(&mut trekstor.screen) - // .ok(); - - // Rectangle::new(Point::new(0, 1), Size::new(trekstor.screen.width(), 1)) - // .into_styled(PrimitiveStyle::with_fill(Rgba::from(green))) - // .draw(&mut trekstor.screen) - // .ok(); - - // Rectangle::new(Point::new(0, 2), Size::new(trekstor.screen.width(), 1)) - // .into_styled(PrimitiveStyle::with_fill(Rgba::from(blue))) - // .draw(&mut trekstor.screen) - // .ok(); - - // device.set_nonblocking(true).unwrap(); - - // loop { - // // println!("dont block"); - - // for event in events { - // match event.destructure() { - // EventSummary::AbsoluteAxis(_, AbsoluteAxisCode::ABS_X, value) => { - // x = (((value - 13) as f32 / 882.) * (trekstor.width() as f32)) as i32; - // } - // EventSummary::AbsoluteAxis(_, AbsoluteAxisCode::ABS_Y, value) => { - // y = (((value - 13) as f32 / 624.) * (trekstor.height() as f32)) as i32; - // } - // EventSummary::Key(_, KeyCode::BTN_TOUCH, value) => { - // // if value is 1, touch is started - // // if value is 0, touch ended - // println!("touch: {}", value) - // } - // _ => {} - // } - // } - - // println!("{}x{}", x, y); - - // trekstor.clear(Rgba::from((0, 0, 0, 255))).ok(); - // Rectangle::new(Point::new(x - 50, y - 50), Size::new(100, 100)) - // .into_styled(PrimitiveStyle::with_fill(Rgba::from(blue))) - // .draw(&mut trekstor) - // .ok(); - // } } diff --git a/ui/main.slint b/ui/main.slint index 7aba0c5..bf58ba4 100644 --- a/ui/main.slint +++ b/ui/main.slint @@ -6,6 +6,7 @@ export component AppWindow inherits Window { VerticalBox { Text { text: "Counter: \{root.counter}"; + font-size: 24px; } Button { text: "Increase value";