mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-12-01 04:34:11 +01:00
refactor(bar-core): move the komorebi widget config types and KomorebiLayout into the core
The seven Komorebi*Config structs (komorebi.rs) and the KomorebiLayout enum with its hand-written Deserialize and Display (komorebi_layout.rs) are data: they move to crates/komorebi-bar-core/src/widgets/komorebi_config.rs, which needs komorebi-layouts (DefaultLayout; schemars forwarded) and color-eyre in the core: two lines in each Cargo.lock. The two shells re-export them. The inherent impl of KomorebiLayout (is_default, on_click, show_icon, show, the egui painting) cannot stay an inherent impl of a foreign type: it becomes the extension trait `KomorebiLayoutExt` in each shell with the same bodies; komorebi.rs imports the trait. Because the types are no longer in the shell file, the two komorebi_layout.rs differ no more than the Windows one; the macOS widget files keep their own komorebi.rs runtime. Verified: schema harness macOS and Windows byte-identical (3,774 / 9,091 lines); native bar-core tests 3+5; Windows clippy -D warnings --locked clean; macOS fake-CC check --locked 0 errors (core files touched first). I reverted a stray `cargo fmt --all` that had reformatted unrelated files. Not run: the bars.
This commit is contained in:
1 parent
cb8fc00afb
commit
c2e6b01f89
9 files changed
+228
-313
No files matched your search
Generated
+2
@@ -3445,10 +3445,12 @@ version = "0.1.42"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"chrono-tz",
|
||||
"color-eyre",
|
||||
"eframe",
|
||||
"egui-phosphor",
|
||||
"image 0.25.10",
|
||||
"komorebi-config",
|
||||
"komorebi-layouts",
|
||||
"komorebi-protocol",
|
||||
"lazy_static",
|
||||
"reqwest",
|
||||
|
||||
Reference in new issue
Block a user