Initial Commit
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/target
|
||||||
5882
Cargo.lock
generated
Normal file
5882
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
14
Cargo.toml
Normal file
14
Cargo.toml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
[package]
|
||||||
|
name = "photobooth-app"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2024"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
slint = "1.18.1"
|
||||||
|
|
||||||
|
[build-dependencies]
|
||||||
|
slint-build = "1.18.1"
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
codegen-units = 1
|
||||||
|
lto = true
|
||||||
3
build.rs
Normal file
3
build.rs
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
fn main() {
|
||||||
|
slint_build::compile("ui/app-window.slint").expect("Slint build failed");
|
||||||
|
}
|
||||||
15
src/main.rs
Normal file
15
src/main.rs
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||||
|
|
||||||
|
use std::error::Error;
|
||||||
|
|
||||||
|
slint::include_modules!();
|
||||||
|
|
||||||
|
fn main() -> Result<(), Box<dyn Error>> {
|
||||||
|
let ui = AppWindow::new()?;
|
||||||
|
|
||||||
|
let ui_handle = ui.as_weak();
|
||||||
|
|
||||||
|
ui.run()?;
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
10
ui/app-window.slint
Normal file
10
ui/app-window.slint
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import { Button, VerticalBox } from "std-widgets.slint";
|
||||||
|
|
||||||
|
export component AppWindow inherits Window {
|
||||||
|
VerticalBox {
|
||||||
|
Text {
|
||||||
|
text: "Welcome to winf-photobooth";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user