mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-30 20:24:09 +01:00
This was debugged by Lando Calrissian on Discord who submitted this text patch. The rest of this commit message is from Lando's investigation summary shared on Discord: The left panel in komorebi-bar uses `Align2::LEFT_CENTER` anchor, which vertically centers the panel content within the bar. When switching between workspaces with windows (icons) and empty workspaces (text labels only), the content height differed by ~1-2px, causing the vertical center point to shift - resulting in visible "bobbing" of the workspace indicators. The height inconsistency occurred because: 1. `show_icons()` wrapped content in a Frame with inner_margin 2. `show_fallback_icon()` had NO Frame wrapper 3. `show_label()` had NO Frame wrapper and used default text height Fix: 1. Wrap `show_fallback_icon()` in the same Frame with inner_margin as show_icons 2. Wrap `show_label()` in the same Frame with inner_margin as show_icons 3. Add `ui.set_min_height(self.icon_size.y)` to show_label to ensure the label has the same minimum height as icons 4. Change show_label from static to instance method (&self) to access icon_size This ensures all three rendering functions produce consistent content height, preventing the LEFT_CENTER anchor from shifting when workspace content changes.