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

commit97c7531aecaa1d96efcea2e47e58db7a4f86c162
parent239f06d53e
authorLucas Galante <lsgalante12@gmail.com>
date2026-10-07 00:18
Remove the unused stable_text_width

Nothing calls it any more (modules size to their live text through
live_text_width), and it was the crate's one dead-code warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

 src/modules.rs | 23 ++---------------------
 1 file changed, 2 insertions(+), 21 deletions(-)

diff --git a/src/modules.rs b/src/modules.rs
index 250f43e..a220263 100644
--- a/src/modules.rs
+++ b/src/modules.rs
@@ -78,27 +78,8 @@ pub trait StatusModule {
     );
 }
 
-/// A stat module's width from the WIDER of its live text and a
-/// widest-plausible template ("Cpu 100%"), plus padding. Sizing to the live
-/// text alone made the surface resize whenever the value crossed a digit
-/// boundary ("Cpu 9.9%" ↔ "Cpu 10.2%"), which re-arranged the whole status
-/// strip and — through the compositor's configure echo — ping-ponged the
-/// module and its neighbors at frame rate (the tray/cpu jitter).
-fn stable_text_width(
-    font_system: &mut FontSystem,
-    text: &str,
-    template: &str,
-    font_size: f32,
-    font_family: &str,
-    padding: f32,
-) -> f32 {
-    let live = Label::new_with_family(font_system, text, font_size, [0.0, 0.0, 0.0, 1.0], font_family).w;
-    let tmpl = Label::new_with_family(font_system, template, font_size, [0.0, 0.0, 0.0, 1.0], font_family).w;
-    live.max(tmpl) + 2.0 * padding
-}
-
-/// The live half of `stable_text_width`: the text as it is right now, plus
-/// padding — the content measure `content_width` implementations return.
+/// A module's text as it is right now, plus padding — the content measure
+/// `content_width` implementations return.
 fn live_text_width(
     font_system: &mut FontSystem,
     text: &str,