Skip to content

Commit a7e384b

Browse files
Split off pc support
1 parent 29537a4 commit a7e384b

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

Cargo.toml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,19 @@ edition = "2021"
66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

88
[dependencies]
9-
slint = {version = "1", features = ["renderer-software"]}
9+
slint = {version = "1", default-features = false, features = ["renderer-software", "compat-1-2", "std"]}
1010
toml = "0"
1111
thiserror = "2"
1212
clap = { version = "4", features = ["derive"] }
1313
serde = "1.0"
1414
tokio = { version = "1", features = ["full"]}
15-
moonraker-rs = { path = "./moonraker-rs"}
15+
moonraker-rs = { path = "./moonraker-rs" }
1616
image = { version = "0", default-features = false, features = ["png"] }
1717
optional_struct = "0"
1818

19+
[features]
20+
pc = ["slint/accessibility", "slint/backend-default", "slint/renderer-femtovg"]
21+
1922
[target.'cfg(unix)'.dependencies]
2023
evdev = "0"
2124
linuxfb = "0"
@@ -32,4 +35,6 @@ image = "cross-armv7:latest"
3235

3336
[profile.release]
3437
strip = true
35-
lto = true
38+
lto = true
39+
opt-level = "z"
40+
codegen-units = 1

src/event_loop/display_status.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use moonraker_rs::connector::websocket_read::PrinterEvent;
22
use slint::{ComponentHandle, SharedString};
33

4-
use crate::{application_error::ApplicationError, event_loop::EventLoop, DisplayStatus};
4+
use crate::{application_error::ApplicationError, event_loop::EventLoop, DisplayStatus, PrintStatus};
55

66
impl EventLoop {
77
pub fn handle_display_status_updates(
@@ -14,7 +14,7 @@ impl EventLoop {
1414

1515
self.ui_weak.upgrade_in_event_loop(move |ui| {
1616
ui.global::<DisplayStatus>().set_message(message);
17-
ui.global::<DisplayStatus>().set_progress(progress);
17+
ui.global::<PrintStatus>().set_progress(progress);
1818
})?;
1919
}
2020

0 commit comments

Comments
 (0)