fix(gtk): tray-menu arrows via USER-priority counter-rule; show menu icons
Some checks failed
Check / eval (push) Failing after 1m26s
Some checks failed
Check / eval (push) Failing after 1m26s
Two corrections to ac7e6bd, which broke the bar it meant to spare:
1. Scoping the waybar '*' reset to 'window#waybar *' gave every reset
property id-level specificity, so it started BEATING the later
class rules (Boreal's pill border-radius/borders, workspace pills)
that plain '*' correctly lost to — visibly wrecking the bar.
Reverted all three stylesheets to the plain '*' block (bar restored
byte-identical to pre-ac7e6bd) and instead restored the arrow where
priority genuinely outranks waybar's stylesheet: stylix's gtk.css
loads at USER priority (800) vs waybar's APPLICATION (600), so a
'menu menuitem arrow { min-width/height: 16px }' there survives the
reset in Waybar-hosted menus — the exact mechanism the neighbouring
check/radio rule already uses for the same collapse. NB comments at
each '*' block warn against re-scoping.
2. The 'missing icons' were never just arrows: GTK3 ships
gtk-menu-images=false since 3.10, so image menu items (nm-applet's
Wi-Fi list, udiskie) render iconless everywhere. Set
gtk.gtk3.extraConfig.gtk-menu-images = 1 (merges into the
settings.ini Stylix already writes).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -70,9 +70,17 @@ in
|
|||||||
}
|
}
|
||||||
/* Submenu disclosure arrows need no icon remap: pan-end-symbolic
|
/* Submenu disclosure arrows need no icon remap: pan-end-symbolic
|
||||||
resolves via Papirus-Dark's breeze-dark inheritance. The
|
resolves via Papirus-Dark's breeze-dark inheritance. The
|
||||||
"invisible arrow" bug was Waybar's stylesheet leaking
|
"invisible arrow" bug is Waybar's process-wide stylesheet:
|
||||||
min-height:0 into the tray menus it hosts — fixed by scoping
|
its `* { min-height: 0; }` reset also hits the SNI tray menus
|
||||||
the `*` block in every waybar.css to window#waybar. */
|
Waybar hosts and collapses the arrow node. This file loads at
|
||||||
|
USER priority (~/.config/gtk-3.0/gtk.css), which outranks any
|
||||||
|
waybar.css (APPLICATION priority) — restore the arrow's box
|
||||||
|
here, exactly like the check/radio rule below already does
|
||||||
|
for the same collapse. */
|
||||||
|
menu menuitem arrow, .menu menuitem arrow, .context-menu menuitem arrow {
|
||||||
|
min-width: 16px;
|
||||||
|
min-height: 16px;
|
||||||
|
}
|
||||||
check, radio {
|
check, radio {
|
||||||
min-width: 14px;
|
min-width: 14px;
|
||||||
min-height: 14px;
|
min-height: 14px;
|
||||||
@@ -134,6 +142,13 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# GTK3 hides menu-item icons by default (gtk-menu-images was flipped
|
||||||
|
# off upstream in 3.10). Classic tray menus — nm-applet's Wi-Fi list,
|
||||||
|
# udiskie — are built as image menu items, so without this their icons
|
||||||
|
# silently vanish. Stylix drives the HM gtk module, so extraConfig
|
||||||
|
# merges into the same settings.ini it already writes.
|
||||||
|
gtk.gtk3.extraConfig."gtk-menu-images" = 1;
|
||||||
|
|
||||||
# GTK4/libadwaita and Qt6 apps decide dark vs light from the XDG
|
# GTK4/libadwaita and Qt6 apps decide dark vs light from the XDG
|
||||||
# portal's color-scheme (org.freedesktop.appearance), which
|
# portal's color-scheme (org.freedesktop.appearance), which
|
||||||
# xdg-desktop-portal-gtk sources from this gsettings key. Stylix sets
|
# xdg-desktop-portal-gtk sources from this gsettings key. Stylix sets
|
||||||
|
|||||||
@@ -381,12 +381,13 @@ let
|
|||||||
/* Palette baked from theme-state.json */
|
/* Palette baked from theme-state.json */
|
||||||
${colorDefs}
|
${colorDefs}
|
||||||
|
|
||||||
/* Scoped to the bar window: Waybar's stylesheet applies process-wide,
|
/* NB: this `*` reset reaches the SNI tray menus Waybar hosts too
|
||||||
so a bare `*` also hits the SNI tray menus Waybar hosts (nm-applet
|
(its stylesheet applies process-wide) — the menu-side damage
|
||||||
& co) — `min-height: 0` there collapses the submenu arrow node to
|
(collapsed arrows/checks) is undone by USER-priority counter-rules
|
||||||
invisible. Whole-swap theme waybar.css files scope the same way. */
|
in stylix.nix, which outrank any waybar.css. Do NOT scope this to
|
||||||
window#waybar,
|
window#waybar: the id's specificity would beat the class rules
|
||||||
window#waybar * {
|
below (pills, workspaces) and wreck the bar. */
|
||||||
|
* {
|
||||||
font-family: "${t.fonts.ui}", "${t.fonts.mono}";
|
font-family: "${t.fonts.ui}", "${t.fonts.mono}";
|
||||||
font-size: ${toString t.fonts.size}pt;
|
font-size: ${toString t.fonts.size}pt;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
@@ -499,10 +500,6 @@ let
|
|||||||
background: @surface;
|
background: @surface;
|
||||||
border: ${toString t.ui.borderSize}px solid alpha(@accent, 0.4);
|
border: ${toString t.ui.borderSize}px solid alpha(@accent, 0.4);
|
||||||
border-radius: ${toString t.ui.rounding}px;
|
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; }
|
tooltip label { color: @text; }
|
||||||
'';
|
'';
|
||||||
|
|||||||
@@ -23,11 +23,11 @@
|
|||||||
@define-color warn #E6C384;
|
@define-color warn #E6C384;
|
||||||
@define-color bad #E2818A;
|
@define-color bad #E2818A;
|
||||||
|
|
||||||
/* Scoped to the bar window: Waybar's stylesheet applies process-wide, so a
|
/* NB: this `*` reset reaches the SNI tray menus Waybar hosts too — the
|
||||||
bare `*` also hits the SNI tray menus Waybar hosts (nm-applet & co) —
|
menu-side damage (collapsed arrows) is undone by USER-priority rules in
|
||||||
`min-height: 0` there collapses the submenu arrow node to invisible. */
|
stylix.nix. Do NOT scope it to window#waybar: the id's specificity would
|
||||||
window#waybar,
|
beat the class rules below (pills) and wreck the bar. */
|
||||||
window#waybar * {
|
* {
|
||||||
/* Mono Nerd face for status glyphs (tight right bearings on the
|
/* Mono Nerd face for status glyphs (tight right bearings on the
|
||||||
proportional Symbols face make icon+percentage collide). */
|
proportional Symbols face make icon+percentage collide). */
|
||||||
font-family: "GeistMono Nerd Font", "Symbols Nerd Font Mono";
|
font-family: "GeistMono Nerd Font", "Symbols Nerd Font Mono";
|
||||||
@@ -169,10 +169,5 @@ tooltip {
|
|||||||
background: alpha(@base, 0.96);
|
background: alpha(@base, 0.96);
|
||||||
border: 1px solid alpha(@accentAlt, 0.3);
|
border: 1px solid alpha(@accentAlt, 0.3);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
/* Tooltips are separate toplevels, outside the window#waybar scope —
|
|
||||||
restate the bar font (calendar/calcurse columns need the mono face). */
|
|
||||||
font-family: "GeistMono Nerd Font", "Symbols Nerd Font Mono";
|
|
||||||
font-size: 13px;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
}
|
||||||
tooltip label { color: @text; }
|
tooltip label { color: @text; }
|
||||||
|
|||||||
@@ -21,11 +21,11 @@
|
|||||||
@define-color warn #DBA85A;
|
@define-color warn #DBA85A;
|
||||||
@define-color bad #D06B71;
|
@define-color bad #D06B71;
|
||||||
|
|
||||||
/* Scoped to the bar window: Waybar's stylesheet applies process-wide, so a
|
/* NB: this `*` reset reaches the SNI tray menus Waybar hosts too — the
|
||||||
bare `*` also hits the SNI tray menus Waybar hosts (nm-applet & co) —
|
menu-side damage (collapsed arrows) is undone by USER-priority rules in
|
||||||
`min-height: 0` there collapses the submenu arrow node to invisible. */
|
stylix.nix. Do NOT scope it to window#waybar: the id's specificity would
|
||||||
window#waybar,
|
beat the class rules below and wreck the bar. */
|
||||||
window#waybar * {
|
* {
|
||||||
/* Mono Nerd face first for status glyphs: proportional "Symbols Nerd
|
/* Mono Nerd face first for status glyphs: proportional "Symbols Nerd
|
||||||
Font" has tight right bearings that make icon+percentage collide. */
|
Font" has tight right bearings that make icon+percentage collide. */
|
||||||
font-family: "Symbols Nerd Font Mono", "Inter", "JetBrainsMono Nerd Font", sans-serif;
|
font-family: "Symbols Nerd Font Mono", "Inter", "JetBrainsMono Nerd Font", sans-serif;
|
||||||
@@ -183,11 +183,6 @@ tooltip {
|
|||||||
background: @surface;
|
background: @surface;
|
||||||
border: 1px solid @overlay;
|
border: 1px solid @overlay;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
/* Tooltips are separate toplevels, outside the window#waybar scope —
|
|
||||||
restate the bar font (calendar/calcurse columns need the mono face). */
|
|
||||||
font-family: "Symbols Nerd Font Mono", "Inter", "JetBrainsMono Nerd Font", sans-serif;
|
|
||||||
font-size: 13px;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
}
|
||||||
tooltip label {
|
tooltip label {
|
||||||
color: @text;
|
color: @text;
|
||||||
|
|||||||
Reference in New Issue
Block a user