git.lucas.co / cce-status-interface
status bar
git clone https://git.lucas.co/cce-status-interface.git

commit87dff6f43d242575115bf0510675e1416291a707
parent2eebb75ff6
authorLucas Galante <[email protected]>
date2026-09-17 07:57
readout glyphs default to the tray's 16px

Bar height − 6 read a size larger than the tray icons sharing the strip.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

 CLAUDE.md      |  2 +-
 src/config.rs  | 15 +++++++++------
 src/modules.rs |  2 +-
 3 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/CLAUDE.md b/CLAUDE.md
index 57f52e2..46d3479 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -242,7 +242,7 @@ silhouette's AA feather plus `DropletSpec::shadow_gap()` for the shadow's
 falloff (`main.rs`, three call sites — left, right, and the expanded menu
 box, which becomes the drop growing))
 and `module { icon_size }` (glyph height for the icon readouts, logical px,
-default bar height − 6) and `module { icon_font_size }` (the number beside
+default 16 = the tray's fixed icon size, so the two read as one set) and `module { icon_font_size }` (the number beside
 the glyph, default `module { font_size }`) and `module { icon_gap }` (glyph
 to number, logical px, default 4) and `module { icon_spacing }` (between
 readouts in the `stats` bubble, default `module { spacing }`) and
diff --git a/src/config.rs b/src/config.rs
index fc6ffe9..5d0dbae 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -192,15 +192,18 @@ pub(crate) fn read_text_raise_from_config() -> f32 {
 }
 
 /// `module { icon_size }` — the glyph height, logical px, for the modules
-/// that read out as a cce-icons glyph with their value on it (cpu,
-/// brightness, volume, battery). Default: the bar height less 6, so the
-/// glyph sits inside the bubble with a 3px breath above and below.
+/// that read out as a cce-icons glyph beside their value (cpu, memory,
+/// brightness, volume, battery). Default `TRAY_ICON_SIZE`: the readout
+/// glyphs and the tray icons share the strip and read as one set only at
+/// one size (bar height − 6 was tried first and read a size larger).
 pub(crate) fn read_icon_size_from_config() -> f32 {
-    cfg_f32("/module/icon_size")
-        .unwrap_or_else(|| read_status_height_from_config() - 6.0)
-        .max(4.0)
+    cfg_f32("/module/icon_size").unwrap_or(TRAY_ICON_SIZE).max(4.0)
 }
 
+/// The tray's icon size, logical px — fixed, and what the readout glyphs
+/// default to.
+pub(crate) const TRAY_ICON_SIZE: f32 = 16.0;
+
 /// `module { icon_font_size }` — the size of the number beside a glyph.
 /// Defaults to the module font size, so the readouts match the clock.
 pub(crate) fn read_icon_font_size_from_config(font_size: f32) -> f32 {
diff --git a/src/modules.rs b/src/modules.rs
index 7216627..b9995c6 100644
--- a/src/modules.rs
+++ b/src/modules.rs
@@ -770,7 +770,7 @@ impl StatusModule for TrayModule {
         sorted_tray.sort_by_key(|item| &item.id);
 
         for (i, item) in sorted_tray.iter().enumerate() {
-            let icon_size = 16.0;
+            let icon_size = crate::config::TRAY_ICON_SIZE;
             let icon_x = x + padding + (i as f32) * (icon_size + 8.0);
             // The same `module { text_raise }` lift every text run gets via
             // `centered_text_y` — without it the icons sit at geometric