mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-12-03 21:54:27 +01:00
refactor(bar-core): move ImageIcon, ImageIconId and the icons cache into the core
The icon cache (IconsCache, ICONS_CACHE, ImageIcon, ImageIconId, rgba_to_color_image) was in widgets/mod.rs of both bars with two small differences: Windows has `Hwnd(isize)`, `SystrayIcon(String)` and `remove`, macOS has `WindowId(u32)` and a private rgba_to_color_image. The core file is the Windows one with the macOS variant and `From<u32>` added (an enum with every variant, as D26 does for WidgetConfig); both bars re-export the items from widgets/mod.rs so no widget changes. The core gains the `image` dependency (one line in each Cargo.lock) and a Default impl for IconsCache (clippy). 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 (re-run after touching the core files). Not run: the bars.
This commit is contained in:
1 parent
e7cf89d8f5
commit
0c197e8652
7 files changed
+194
-322
No files matched your search
Generated
+1
@@ -3447,6 +3447,7 @@ dependencies = [
|
||||
"chrono-tz",
|
||||
"eframe",
|
||||
"egui-phosphor",
|
||||
"image 0.25.10",
|
||||
"lazy_static",
|
||||
"reqwest",
|
||||
"schemars 1.2.3",
|
||||
|
||||
Reference in new issue
Block a user