aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/generate.py
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-02 22:09:55 -0400
committerCraig Jennings <c@cjennings.net>2026-07-02 22:09:55 -0400
commit1e10023c65acb36b5e6c378771d8a1773b1b3f9e (patch)
tree5d8b59448a7f277ffd3fa6ec63290ceda2caabb7 /scripts/theme-studio/generate.py
parent2a971d4637dfa1e21e37dc3b6429e9e8743b68ed (diff)
downloaddotemacs-1e10023c65acb36b5e6c378771d8a1773b1b3f9e.tar.gz
dotemacs-1e10023c65acb36b5e6c378771d8a1773b1b3f9e.zip
fix(theme-studio): pin mode-line at an absolute height
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.
Diffstat (limited to 'scripts/theme-studio/generate.py')
-rw-r--r--scripts/theme-studio/generate.py14
1 files changed, 14 insertions, 0 deletions
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):