feat: Added light and dark features
- Updated slint to 1.15.1
This commit is contained in:
parent
d4e924b258
commit
d08e172f34
3 changed files with 1621 additions and 1103 deletions
14
build.rs
14
build.rs
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue