From 91930c2d0deb0e9d49e874ff8a49c8e04c69896e Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 23 Feb 2026 19:37:59 -0800 Subject: [PATCH] UnifiedLabel: add set_line_height --- system/ui/widgets/label.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/system/ui/widgets/label.py b/system/ui/widgets/label.py index 865c8b38c..8ed9ec62f 100644 --- a/system/ui/widgets/label.py +++ b/system/ui/widgets/label.py @@ -489,6 +489,13 @@ class UnifiedLabel(Widget): self._spacing_pixels = self._font_size * letter_spacing self._cached_text = None # Invalidate cache + def set_line_height(self, line_height: float): + """Update line height (multiplier, e.g., 1.0 = default).""" + new_line_height = line_height * 0.9 + if self._line_height != new_line_height: + self._line_height = new_line_height + self._cached_text = None # Invalidate cache (affects total height) + def set_font_weight(self, font_weight: FontWeight): """Update the font weight.""" if self._font_weight != font_weight: