From 1e10023c65acb36b5e6c378771d8a1773b1b3f9e Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 2 Jul 2026 22:09:55 -0400 Subject: fix(theme-studio): pin mode-line at an absolute height MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mode-line's :height was unspecified, so a buffer that remaps its default face larger (the nov reading view) inflated its modeline with it. Seed an absolute 130 (1/10pt) on mode-line — build_uimap gains apply_modeline_height_default, mirroring the hover-box default — and set it in WIP.json. Also drop the stray :height 2 from mode-line-inactive (a JSON integral-float collapse that rendered inactive bars at 0.2pt); inactive now inherits mode-line's height. Theme regenerated and loaded live; the editable-height spec covers making this tunable in the studio. --- scripts/theme-studio/generate.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'scripts/theme-studio/generate.py') diff --git a/scripts/theme-studio/generate.py b/scripts/theme-studio/generate.py index 5636d753..144687fd 100644 --- a/scripts/theme-studio/generate.py +++ b/scripts/theme-studio/generate.py @@ -218,6 +218,19 @@ def apply_builtin_fallback_styles(uimap): for face in ("mode-line","mode-line-inactive"): uimap[face]["box"]={"style":"released","width":1,"color":None} +def apply_modeline_height_default(uimap): + """Seed an absolute height on mode-line so it never tracks the buffer default. + + mode-line's :height is unspecified in stock Emacs, so it inherits the + buffer's default face height -- a buffer that remaps default larger (the + nov-reading view) inflates its modeline with it. A fixed 1/10pt integer + pins the bar. 130 matches the configured laptop default-height; editable + once the height control ships (theme-studio-editable-height-spec). + mode-line-inactive inherits mode-line, so it gets no seed of its own.""" + face = uimap.get("mode-line") + if face and face.get("height") is None: + face["height"] = 130 + def apply_hover_box_default(uimap): """Seed the mode-line hover face's box. @@ -238,6 +251,7 @@ def build_uimap(ui_faces,defaults): uimap={face[0]:ui_face_spec() for face in ui_faces} apply_builtin_fallback_styles(uimap) apply_hover_box_default(uimap) + apply_modeline_height_default(uimap) return uimap def build_syntax(cols,map_,bold,italic,defaults): -- cgit v1.2.3