fix(theme): dark adw-gtk3 for dark palettes — GTK dialog buttons (#98)
Some checks failed
Check / eval (push) Has been cancelled

Stylix always used the light adw-gtk3 sheet with recolored tokens; that
sheet hardcodes near-black button labels, which became black-on-dark in
Boreal GTK dialogs. Force adw-gtk3-dark (and prefer-dark) for dark mode,
and pin dialog button label colours in Stylix extraCss.
This commit is contained in:
2026-07-15 12:06:38 +01:00
parent edc1415521
commit e9dd3d14c5
5 changed files with 75 additions and 20 deletions

View File

@@ -479,7 +479,7 @@ gp gpl gf # push · pull · fetch --all --prune
# nix (lifecycle: nomarchy-pull / nomarchy-rebuild / nomarchy-home — full names) # nix (lifecycle: nomarchy-pull / nomarchy-rebuild / nomarchy-home — full names)
ns nr # nix shell · nix run (e.g. ns nixpkgs#ripgrep) ns nr # nix shell · nix run (e.g. ns nixpkgs#ripgrep)
nfu nfc # nix flake update · check (prefer nomarchy-pull for day-to-day) nfu nfc # nix flake update · check (prefer nomarchy-pull for day-to-day)
nsearch ngc # nix search nixpkgs · nix-collect-garbage -d nsearch ngc # nix search · nix-collect-garbage -d (prefer: sudo nomarchy-gen-prune)
# misc # misc
path # print $PATH, one entry per line path # print $PATH, one entry per line

View File

@@ -31,22 +31,6 @@ post-boot sessions). Preserve separation: the installer bake failure and the
flake pin are different root causes even when they show up on the same machine. flake pin are different root causes even when they show up on the same machine.
(Terminal / Ghostty-on-Acer → shipped as Kitty-only, #95.) (Terminal / Ghostty-on-Acer → shipped as Kitty-only, #95.)
### 98. Boreal: button text renders black and is difficult to read
Audit GTK button foreground/background contrast under Boreal, including the
installer surface where it was observed. Follow THEME-DESIGN's two-theme
visual protocol. Pass = normal, hover, focused, and disabled button labels
remain legible and palette-consistent.
**Progress 2026-07-13:** scripted checks pass all 24 themes — not
palette-level. Stylix gtk.css for Boreal audited: fg roles are light
(#d3dae0); the near-black values are `accent/warning/error_fg_color`
(#21272f) on their pastel bgs (deliberate, ~4.4:1). Candidate surfaces:
adw-gtk3 (light base) + dark recolor edge cases, or gum's TUI confirm
buttons in the installer (VM gum screens under Boreal look legible —
artifacts in `/tmp/nomarchy-v2-swap-93/`). Needs Bernardo's screenshot or
an Acer repro to pin the actual widget before fixing.
### 127. `[blocked:hw]` Docked idle: black screens, no wake, undock does not restore panel ### 127. `[blocked:hw]` Docked idle: black screens, no wake, undock does not restore panel
Bernardo 2026-07-15 (AMD dev box, docked): left the laptop docked; after a Bernardo 2026-07-15 (AMD dev box, docked): left the laptop docked; after a

View File

@@ -19,6 +19,17 @@ Template:
--- ---
## 2026-07-15 — #98 GTK dialog button black-on-dark (Boreal)
- **Task:** Bernardo: GTK dialog button labels black vs dark Boreal chrome.
- **Did:** Root cause — Stylix pins light `adw-gtk3` for all polarities.
Force `adw-gtk3-dark` when mode=dark, prefer-dark, and extraCss for
dialog/action button labels (suggested/destructive keep dark-on-pastel).
- **Verified:** V1 HM gen: settings.ini `gtk-theme-name=adw-gtk3-dark`,
prefer-dark=true, gtk.css button rules present. V3: open a GTK dialog
after nomarchy-home.
- **Pending:** V3 eyeball on real session.
- **Next suggestion:** hardware queue or human #115/#120.
## 2026-07-15 — Document generation prune for users (#128 docs) ## 2026-07-15 — Document generation prune for users (#128 docs)
- **Task:** User-facing docs for the 14d / keep-≥3-past policy. - **Task:** User-facing docs for the 14d / keep-≥3-past policy.
- **Did:** RECOVERY §4 (how gens are kept); README generation section + - **Did:** RECOVERY §4 (how gens are kept); README generation section +

View File

@@ -427,6 +427,11 @@ Design/decision records and a running log of shipped work (items marked
default `$TERMINAL` / SUPER+Return, doctor + calendar + what-changed use default `$TERMINAL` / SUPER+Return, doctor + calendar + what-changed use
`kitty --class=com.nomarchy.*`. Ghostty module and install-time GL probe `kitty --class=com.nomarchy.*`. Ghostty module and install-time GL probe
removed. V3: Acer SUPER+Return + doctor float. removed. V3: Acer SUPER+Return + doctor float.
- ✓ **GTK dialog button labels (#98):** Stylix always set `gtk-theme-name=
adw-gtk3` (light sheet) while recoloring tokens for dark palettes — light
sheet hardcodes near-black button text → black-on-dark in GTK dialogs
(Boreal). Fix: force `adw-gtk3-dark` / `adw-gtk3` from palette mode,
prefer-dark, and pin dialog button colours in Stylix extraCss.
- ✓ **Generation prune (#128):** weekly `nomarchy-gen-prune` (system + HM): - ✓ **Generation prune (#128):** weekly `nomarchy-gen-prune` (system + HM):
delete only gens older than **14 days** that are also beyond the **3 most delete only gens older than **14 days** that are also beyond the **3 most
recent past** gens (current always kept). Stock `nix.gc` no longer uses recent past** gens (current always kept). Stock `nix.gc` no longer uses

View File

@@ -54,6 +54,13 @@ in
# contrast selected rows + explicit arrow colour. Appended to # contrast selected rows + explicit arrow colour. Appended to
# Stylix's generated gtk.css (not gtk.gtk3.extraCss — that is a # Stylix's generated gtk.css (not gtk.gtk3.extraCss — that is a
# no-op under Stylix). # no-op under Stylix).
#
# #98: dialog button labels. Stylix always installs theme name
# "adw-gtk3" (light sheet) and only recolors @define-color vars.
# The light sheet hardcodes dark/black button text in places; on a
# dark palette that becomes black-on-dark in GTK dialogs. We force
# adw-gtk3-dark for dark mode (below) and still pin button label
# colours here so dialogs stay legible if a light sheet slips in.
extraCss = '' extraCss = ''
menu menuitem, .menu menuitem, .context-menu menuitem { menu menuitem, .menu menuitem, .context-menu menuitem {
color: #${base16.base05}; color: #${base16.base05};
@@ -95,6 +102,33 @@ in
background-color: #${base16.base0D}; background-color: #${base16.base0D};
color: #${base16.base00}; color: #${base16.base00};
} }
/* Dialog / message-box action buttons (#98). */
button, button label,
.dialog-action-area button,
.dialog-action-area button label,
messagedialog button,
messagedialog button label,
.message-dialog button,
.message-dialog button label {
color: #${base16.base05};
}
button:disabled, button:disabled label {
color: alpha(#${base16.base05}, 0.5);
}
/* Suggested/destructive sit on pastel accent/bad dark label
is intentional and contrast-checked (~4:1 on Boreal accent). */
button.suggested-action, button.suggested-action label,
button.destructive-action, button.destructive-action label,
button.default, button.default label {
color: #${base16.base00};
}
button.suggested-action.flat, button.suggested-action.flat label {
color: #${base16.base0D};
}
button.destructive-action.flat, button.destructive-action.flat label {
color: #${base16.base08};
}
''; '';
}; };
qt.enable = true; qt.enable = true;
@@ -147,7 +181,23 @@ in
# udiskie — are built as image menu items, so without this their icons # udiskie — are built as image menu items, so without this their icons
# silently vanish. Stylix drives the HM gtk module, so extraConfig # silently vanish. Stylix drives the HM gtk module, so extraConfig
# merges into the same settings.ini it already writes. # merges into the same settings.ini it already writes.
gtk.gtk3.extraConfig."gtk-menu-images" = 1; gtk.gtk3.extraConfig = {
"gtk-menu-images" = 1;
# Pair with adw-gtk3-dark so the theme sheet itself is dark, not just
# the @define-color recolor (see gtk.theme.name below).
"gtk-application-prefer-dark-theme" = t.mode != "light";
};
gtk.gtk4.extraConfig."gtk-application-prefer-dark-theme" = t.mode != "light";
# #98: Stylix hardcodes gtk.theme.name = "adw-gtk3" (light CSS) for every
# polarity and only injects libadwaita colour tokens. The light adw-gtk3
# sheet assumes light chrome and hardcodes near-black button labels in
# places — on Boreal that is black text on dark dialog buttons. Force
# the matching dark/light sheet; the package still provides both names.
gtk.theme = {
package = lib.mkDefault pkgs.adw-gtk3;
name = lib.mkForce (if t.mode == "light" then "adw-gtk3" else "adw-gtk3-dark");
};
# 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
@@ -155,7 +205,12 @@ in
# the GTK theme and `polarity` but not this, so a light theme still # the GTK theme and `polarity` but not this, so a light theme still
# rendered libadwaita/Qt apps dark (and vice-versa). Drive it from the # rendered libadwaita/Qt apps dark (and vice-versa). Drive it from the
# palette mode. (programs.dconf.enable is already on system-side.) # palette mode. (programs.dconf.enable is already on system-side.)
dconf.settings."org/gnome/desktop/interface".color-scheme = dconf.settings."org/gnome/desktop/interface" = {
color-scheme =
if t.mode == "light" then "prefer-light" else "prefer-dark"; if t.mode == "light" then "prefer-light" else "prefer-dark";
gtk-theme =
if t.mode == "light" then "adw-gtk3" else "adw-gtk3-dark";
};
}; };
} }