feat: Added light and dark features

- Updated slint to 1.15.1
This commit is contained in:
Alexey 2026-04-08 14:32:46 +03:00
commit d08e172f34
3 changed files with 1621 additions and 1103 deletions

View file

@ -1,6 +1,18 @@
fn main() {
let mut style = String::from("cosmic");
#[cfg(all(feature = "dark", feature = "light"))]
compile_error!("Features \"dark\" and \"light\" are mutually exclusive");
if cfg!(feature = "dark") {
style.push_str("-dark");
} else if cfg!(feature = "light") {
style.push_str("-light");
}
let config = slint_build::CompilerConfiguration::new()
.with_style("cosmic".into());
.with_style(style);
slint_build::compile_with_config("ui/app-window.slint", config).expect("Slint build failed");
}