aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-29 10:33:26 +0200
committerDanilo M. <danix@danix.xyz>2026-09-29 10:33:26 +0200
commita08ffb69ac7553350e1e5259bb0101ea997a70ae (patch)
tree295de32eaf5c24b576c822751e394d14ba7d1acd
parent27c22afb02a819c8d9e28c9232e515716e92f263 (diff)
downloadgrub-theme-udt-a08ffb69ac7553350e1e5259bb0101ea997a70ae.tar.gz
grub-theme-udt-a08ffb69ac7553350e1e5259bb0101ea997a70ae.zip
Thin the countdown bar to 4px
GRUB 2.14 draws the progress bar at least 28px tall regardless of its height property (measured with ./preview; not explained by the font or the minimal-size code in the source). Keep the component at 28px and draw it with pixmap styles whose top slice is a 24px transparent strip, leaving a 4px surface track filled with accent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
-rwxr-xr-xbuild4
-rw-r--r--docs/superpowers/specs/2026-09-29-grub-theme-udt-design.md5
-rw-r--r--theme.txt.in13
3 files changed, 15 insertions, 7 deletions
diff --git a/build b/build
index 4a6c1d0..5e14ce0 100755
--- a/build
+++ b/build
@@ -147,6 +147,10 @@ def assemble(stage, text, c, wallpaper, fonts):
"select_w.png": (4, 1, (*c["accent"], 255)),
"select_c.png": (1, 1, (*c["surface"], 255)),
"select_e.png": (8, 1, (*c["surface"], 255)),
+ # The countdown bar: see theme.txt.in for why the top slice is clear.
+ "bar_n.png": (1, 24, (0, 0, 0, 0)),
+ "bar_c.png": (1, 1, (*c["surface"], 255)),
+ "hl_c.png": (1, 1, (*c["accent"], 255)),
}
for s in ("nw", "n", "ne", "w", "c", "e", "sw", "s", "se"):
slices[f"terminal_box_{s}.png"] = (1, 1, (*c["bg_deep"], 255))
diff --git a/docs/superpowers/specs/2026-09-29-grub-theme-udt-design.md b/docs/superpowers/specs/2026-09-29-grub-theme-udt-design.md
index ed97584..f64ff8c 100644
--- a/docs/superpowers/specs/2026-09-29-grub-theme-udt-design.md
+++ b/docs/superpowers/specs/2026-09-29-grub-theme-udt-design.md
@@ -35,8 +35,9 @@ the layout echoes sddm-theme-udt's left panel.
- `+ boot_menu`: `item_color = @FG_DIM@`, `selected_item_color = @FG@`,
Noto Sans Regular, no icons (`icon_width = 0`);
- `+ label` with `id = "__timeout__"`, colour `@FG_FAINT@`;
- - `+ progress_bar` with `id = "__timeout__"`, `fg_color = @ACCENT@`,
- `bg_color = @SURFACE@`, a few pixels high.
+ - `+ progress_bar` with `id = "__timeout__"`: a 4px `surface` track
+ filled with `accent`. GRUB 2.14 will not draw it under 28px, so it is
+ 28px with pixmap styles whose `bar_n.png` is a 24px transparent slice.
- **Selected item:** `selected_item_pixmap_style = "select_*.png"`. The `w`
slice is a 4px `accent` bar, the `c` and `e` slices are solid `surface`.
- **Console:** `terminal-box: "terminal_box_*.png"`, all nine slices solid
diff --git a/theme.txt.in b/theme.txt.in
index b864a86..173077d 100644
--- a/theme.txt.in
+++ b/theme.txt.in
@@ -56,15 +56,18 @@ terminal-border: "0"
color = "@FG_FAINT@"
}
+# GRUB 2.14 will not draw this bar under 28px tall, whatever height says
+# (measured in ./preview). So it is 28px with a 24px transparent top slice
+# in bar_n.png, leaving a 4px track: surface (bar_c), filled with accent
+# (hl_c). Change the height and bar_n.png together.
+ progress_bar {
id = "__timeout__"
left = 3%
- top = 87%
+ top = 85%
width = 19%
- height = 4
- fg_color = "@ACCENT@"
- bg_color = "@SURFACE@"
- border_color = "@SURFACE@"
+ height = 28
+ bar_style = "bar_*.png"
+ highlight_style = "hl_*.png"
}
# The panel: bg_alt at ~85% alpha, stretched over the left quarter. Last on