Skip to content

Commit

Permalink
Remove zbus dependency in dark-light
Browse files Browse the repository at this point in the history
This **significantly** reduces compile time and binary size on linux.
Depending on my fork is not ideal, I opened a PR upstream:
rust-dark-light/dark-light#40 but
rust-dark-light/dark-light#15 doesn't
give me confidence.
  • Loading branch information
bbb651 committed Oct 2, 2024
1 parent 7554837 commit 13b44bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ bitflags = "2.0"
bytemuck = { version = "1.0", features = ["derive"] }
bytes = "1.6"
cosmic-text = "0.12"
dark-light = "1.0"
dark-light = { git = "https://github.com/bbb651/rust-dark-light.git", rev = "192daa06be5a0bad927e71c05a1e2eb5d9061c54" }
futures = "0.3"
glam = "0.25"
glyphon = { git = "https://github.com/hecrj/glyphon.git", rev = "0d7ba1bba4dd71eb88d2cface5ce649db2413cb7" }
Expand Down
5 changes: 2 additions & 3 deletions core/src/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,8 @@ impl Default for Theme {
static DEFAULT: Lazy<Theme> =
Lazy::new(|| match dark_light::detect() {
dark_light::Mode::Dark => Theme::Dark,
dark_light::Mode::Light | dark_light::Mode::Default => {
Theme::Light
}
dark_light::Mode::Light
| dark_light::Mode::NoPreference => Theme::Light,
});

DEFAULT.clone()
Expand Down

0 comments on commit 13b44bc

Please sign in to comment.