1786009593

This commit is contained in:
2026-08-06 11:46:33 +02:00
parent 65ff70c4e6
commit 1b2db4c426
5 changed files with 5107 additions and 172 deletions

5248
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -8,4 +8,8 @@ embedded-graphics = "0.8.2"
embedded-graphics-core = "0.4.1"
evdev = "0.13.2"
framebuffer = "0.3.1"
linfb = "0.2.1"
linfb = { version = "0.2.1", default-features = false }
slint = { version = "1.17.1", default-features = false, features = ["compat-1-2", "libm", "renderer-software", "unsafe-single-threaded"] }
[build-dependencies]
slint-build = "1.17.1"

8
build.rs Normal file
View File

@@ -0,0 +1,8 @@
fn main() {
slint_build::compile_with_config(
"ui/main.slint",
slint_build::CompilerConfiguration::new()
.embed_resources(slint_build::EmbedResourcesKind::EmbedForSoftwareRenderer),
)
.unwrap();
}

View File

@@ -17,7 +17,6 @@ fn main() {
let mut trekstor = Trekstor::new(60, app_state);
trekstor.update(|ctx, state| {
// retuyrningf false will exit loop
if ctx.input.is_just_released(KeyCode::BTN_TOUCH) {
println!("Released {}x{}", ctx.input.x, ctx.input.y);
state.x = ctx.input.x;

16
ui/main.slint Normal file
View File

@@ -0,0 +1,16 @@
import { AboutSlint, Button, VerticalBox } from "std-widgets.slint";
export component Demo {
VerticalBox {
alignment: start;
Text {
text: "Hello World!";
font-size: 24px;
horizontal-alignment: center;
}
AboutSlint {
preferred-height: 150px;
}
HorizontalLayout { alignment: center; Button { text: "OK!"; } }
}
}