Init repo
This commit is contained in:
parent
f910e3b605
commit
5a3f46d204
7
.gitignore
vendored
7
.gitignore
vendored
@ -20,3 +20,10 @@ Cargo.lock
|
|||||||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||||
#.idea/
|
#.idea/
|
||||||
|
|
||||||
|
# Added by me
|
||||||
|
/test
|
||||||
|
|
||||||
|
# Added by cargo
|
||||||
|
|
||||||
|
/target
|
||||||
|
|||||||
12
Cargo.toml
Normal file
12
Cargo.toml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[package]
|
||||||
|
name = "power-menu"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2024"
|
||||||
|
build = "build.rs"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
i-slint-backend-winit = { version = "1.14.1", default-features = false, features = ["x11"] }
|
||||||
|
slint = { version = "1.14.1", default-features = false, features = ["backend-winit", "compat-1-2", "renderer-software"] }
|
||||||
|
|
||||||
|
[build-dependencies]
|
||||||
|
slint-build = "1.14.1"
|
||||||
3
build.rs
Normal file
3
build.rs
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fn main() {
|
||||||
|
slint_build::compile("ui/power-menu.slint").unwrap();
|
||||||
|
}
|
||||||
15
src/main.rs
Normal file
15
src/main.rs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
use i_slint_backend_winit::{
|
||||||
|
Backend,
|
||||||
|
winit::{
|
||||||
|
platform::x11::{WindowAttributesExtX11, WindowType},
|
||||||
|
window::WindowAttributes,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
slint::include_modules!();
|
||||||
|
|
||||||
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
|
let ui = PowerMenu::new()?;
|
||||||
|
ui.run();
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
4
ui/power-menu.slint
Normal file
4
ui/power-menu.slint
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export component PowerMenu inherits Window {
|
||||||
|
background: #adadad57;
|
||||||
|
no-frame: true;
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user