diff options
Diffstat (limited to 'resource-viewer')
-rw-r--r-- | resource-viewer/Cargo.toml | 11 | ||||
-rw-r--r-- | resource-viewer/build.rs | 3 | ||||
-rw-r--r-- | resource-viewer/src/main.rs | 13 | ||||
-rw-r--r-- | resource-viewer/ui/appwindow.slint | 17 |
4 files changed, 0 insertions, 44 deletions
diff --git a/resource-viewer/Cargo.toml b/resource-viewer/Cargo.toml deleted file mode 100644 index 2e95506..0000000 --- a/resource-viewer/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "resource-viewer" -version = "0.1.0" -edition = "2021" -build = "build.rs" - -[dependencies] -slint = "1.0" - -[build-dependencies] -slint-build = "1.0" diff --git a/resource-viewer/build.rs b/resource-viewer/build.rs deleted file mode 100644 index 0a2d8aa..0000000 --- a/resource-viewer/build.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - slint_build::compile("ui/appwindow.slint").unwrap(); -} diff --git a/resource-viewer/src/main.rs b/resource-viewer/src/main.rs deleted file mode 100644 index 4fa6b9f..0000000 --- a/resource-viewer/src/main.rs +++ /dev/null @@ -1,13 +0,0 @@ -slint::include_modules!(); - -fn main() -> Result<(), slint::PlatformError> { - let ui = AppWindow::new()?; - - let ui_handle = ui.as_weak(); - ui.on_request_increase_value(move || { - let ui = ui_handle.unwrap(); - ui.set_counter(ui.get_counter() + 1); - }); - - ui.run() -} diff --git a/resource-viewer/ui/appwindow.slint b/resource-viewer/ui/appwindow.slint deleted file mode 100644 index 4862c47..0000000 --- a/resource-viewer/ui/appwindow.slint +++ /dev/null @@ -1,17 +0,0 @@ -import { Button, VerticalBox } from "std-widgets.slint"; - -export component AppWindow inherits Window { - in-out property<int> counter: 42; - callback request-increase-value(); - VerticalBox { - Text { - text: "Counter: \{root.counter}"; - } - Button { - text: "Increase value"; - clicked => { - root.request-increase-value(); - } - } - } -}
\ No newline at end of file |