fix(waybar): scope the universal CSS reset to the bar — un-hides tray submenu arrows
Some checks failed
Check / eval (push) Failing after 1m22s

BACKLOG #90 root-caused: the arrows were never missing from the icon
theme — Papirus-Dark resolves pan-end-symbolic through its breeze-dark
inheritance (breeze ships inside the nixpkgs papirus output). The real
culprit: Waybar loads its stylesheet screen-wide at application
priority, so the tray menus it hosts for SNI apps (nm-applet & co)
inherit the bar's '* { min-height: 0; }', which out-prioritizes
adw-gtk3's 16px min-height on the menuitem arrow node and collapses
the submenu arrow to zero height. Property bisect confirmed
min-height:0 alone reproduces; the font/border resets don't.

- boreal + executive-slate waybar.css, waybar.nix generatedStyle:
  '*' block scoped to 'window#waybar, window#waybar *'; tooltip rules
  restate the font (tooltips are separate toplevels outside the scope).
- stylix.nix: drop the go-next-symbolic remap — a workaround for the
  misdiagnosis; native pan-end-symbolic resolves fine.
- BACKLOG #90 deleted; JOURNAL entry records the method (live GTK3
  repro + grim screenshots + CSS property bisect, V3 on TuringMachine).

V3 pending: human click on the real nm-applet tray icon post-switch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-12 07:47:37 +01:00
parent a9c1d8af12
commit ac7e6bdb4e
6 changed files with 53 additions and 24 deletions

View File

@@ -36,10 +36,6 @@ let
base0F = hex c.bad; # brown/deprecated
};
# Submenu disclosure arrows: GTK/Adwaita expect pan-end-symbolic,
# but Papirus doesn't ship it. Instead of complex CSS overrides and
# bundled SVGs, we map the GTK CSS to use go-next-symbolic which
# DOES exist in Papirus.
in
{
config = lib.mkIf cfg.stylix.enable {
@@ -72,13 +68,11 @@ in
menu menuitem:disabled, .menu menuitem:disabled {
color: #${base16.base03};
}
/* Submenu disclosure arrows: map missing pan-end-symbolic to existing go-next-symbolic. */
menu menuitem arrow:dir(ltr), .menu menuitem arrow:dir(ltr), .context-menu menuitem arrow:dir(ltr) {
-gtk-icon-source: -gtk-icontheme("go-next-symbolic");
}
menu menuitem arrow:dir(rtl), .menu menuitem arrow:dir(rtl), .context-menu menuitem arrow:dir(rtl) {
-gtk-icon-source: -gtk-icontheme("go-previous-symbolic");
}
/* Submenu disclosure arrows need no icon remap: pan-end-symbolic
resolves via Papirus-Dark's breeze-dark inheritance. The
"invisible arrow" bug was Waybar's stylesheet leaking
min-height:0 into the tray menus it hosts fixed by scoping
the `*` block in every waybar.css to window#waybar. */
check, radio {
min-width: 14px;
min-height: 14px;

View File

@@ -381,7 +381,12 @@ let
/* Palette baked from theme-state.json */
${colorDefs}
* {
/* Scoped to the bar window: Waybar's stylesheet applies process-wide,
so a bare `*` also hits the SNI tray menus Waybar hosts (nm-applet
& co) `min-height: 0` there collapses the submenu arrow node to
invisible. Whole-swap theme waybar.css files scope the same way. */
window#waybar,
window#waybar * {
font-family: "${t.fonts.ui}", "${t.fonts.mono}";
font-size: ${toString t.fonts.size}pt;
min-height: 0;
@@ -494,6 +499,10 @@ let
background: @surface;
border: ${toString t.ui.borderSize}px solid alpha(@accent, 0.4);
border-radius: ${toString t.ui.rounding}px;
/* Tooltips are separate toplevels, outside the window#waybar scope
restate the bar font (calendar columns need consistent metrics). */
font-family: "${t.fonts.ui}", "${t.fonts.mono}";
font-size: ${toString t.fonts.size}pt;
}
tooltip label { color: @text; }
'';