Skip to content

Commit 201eedf

Browse files
committed
simplify
1 parent be46ea6 commit 201eedf

File tree

5 files changed

+98
-150
lines changed

5 files changed

+98
-150
lines changed

app/Cargo.lock

Lines changed: 42 additions & 72 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/Cargo.toml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,40 +17,40 @@ path = "src/cli.rs"
1717

1818
[dependencies]
1919
anyhow = "1.0.43"
20-
brightness = { version ="0.5.0", default_features = false }
20+
brightness = { version = "0.5.0", default_features = false }
21+
cfg-if = "1.0.0"
2122
chrono = "0.4"
2223
clap = { version = "4.3.11", features = ["derive"] }
2324
config = "0.10.1"
24-
dirs = "5.0.1"
25+
ctrlc = "3.4.0"
2526
directories = "2.0"
27+
dirs = "5.0.1"
28+
egui = { version = "0.22.0" }
29+
egui-wgpu = { version = "0.22.0", features = ["winit"] }
30+
egui-winit = { version = "0.22.0" }
2631
enum-iterator = "0.6.0"
2732
env_logger = "0.8.4"
2833
futures = "0.3"
2934
geocoding = "0.2.0"
35+
human-repr = "1.1.0"
36+
image = "0.24.7"
37+
itertools = "0.11.0"
3038
lazy_static = "1.4.0"
3139
log = "0.4.14"
3240
maplit = "1.0.2"
41+
png = "0.17.10"
42+
pollster = "0.3.0"
3343
rust-embed = "5.5.1"
34-
simplelog = "0.12.1"
3544
serde = { version = "1.0.110", features = ["derive"] }
45+
serde_json = "1.0.104"
46+
simplelog = "0.12.1"
3647
sunrise-sunset-calculator = "1.0.1"
48+
tempfile = "3.7.0"
3749
thiserror = "1.0"
3850
toml = "0.5"
51+
tray-icon = "0.8.3"
3952
validator = { version = "0.16.1", features = ["derive"] }
40-
cfg-if = "1.0.0"
41-
serde_json = "1.0.104"
42-
tempfile = "3.7.0"
4353
wildmatch = "2.1.1"
44-
ctrlc = "3.4.0"
45-
itertools = "0.11.0"
46-
human-repr = "1.1.0"
47-
tray-icon = "0.8.3"
48-
png = "0.17.10"
49-
egui-winit = { version = "0.22.0" }
50-
egui-wgpu = { version = "0.22.0", features = ["winit"] }
51-
eframe = { version = "0.22.0", features = ["default_fonts"], default-features = false }
52-
pollster = "0.3.0"
53-
image = "0.24.7"
5454

5555
[target.'cfg(unix)'.dependencies]
5656
cpp_core = "0.6.0"
@@ -62,7 +62,7 @@ cursive = { default-features = false, features = ["blt-backend"], version = "0.2
6262

6363
[target.'cfg(windows)'.dependencies]
6464
win32-utils = { git = "https://github.com/jacob-pro/win32-utils", features = ["window", "instance"], rev = "055c60695dbc4d300f3caaacec25ae82415fa545" }
65-
windows = { version = "0.48.0", features = ["Win32_Foundation", "Win32_UI_WindowsAndMessaging"]}
65+
windows = { version = "0.51.1", features = ["Win32_Foundation", "Win32_UI_WindowsAndMessaging"] }
6666

6767
#[target.'cfg(windows)'.dependencies.windows]
6868
#version = "0.29.0"

app/src/gui/app.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
pub struct SsbEguiApp {
2+
age: u32,
3+
}
4+
5+
impl SsbEguiApp {
6+
pub fn new() -> Self {
7+
SsbEguiApp { age: 0 }
8+
}
9+
10+
pub fn update(&mut self, ctx: &egui::Context) {
11+
egui::CentralPanel::default().show(ctx, |ui| {
12+
ui.heading("Hello World!");
13+
if ui.button("Click each year").clicked() {
14+
self.age += 1;
15+
}
16+
ui.label(format!("age {}", self.age));
17+
});
18+
}
19+
}

0 commit comments

Comments
 (0)