fix(theme): destructive buttons were invisible after #98 (1.03:1)
All checks were successful
Check / eval (push) Successful in 3m54s

e9dd3d1 pinned dialog button labels to base00 for dark palettes. That is
correct for suggested-action, whose background adw-gtk3 builds opaquely as
mix(white,@accent_bg_color,0.9) — but destructive-action is the one class
whose background is derived from currentColor:

  background-color: mix(@destructive_color, alpha(currentColor, 0.15), 0.9)

so pinning the label dragged the background down with it. On Boreal the
"Delete" button of a GtkMessageDialog rendered #21272F on #252931 —
1.03:1, invisible — and light palettes hit the same 1.03:1. The most
safety-critical button in a confirmation dialog was the one that vanished.

Pin the destructive background to the same opaque pastel ladder
suggested-action uses. Enabled-only (:not(.flat):not(:disabled)): the
sheet's disabled chrome already renders legibly and must keep it.

Boreal 1.03 -> 6.19:1, summer-day 1.03 -> 2.74:1 (= upstream's
white-on-accent convention; the residual light-mode weakness is #130).

V2: GtkMessageDialog rendered under the real HM session and viewed —
boreal before/after, summer-night (whole-swap), summer-day (light).
Scripted checks stayed green throughout and never saw this; only the
render did. Follow-ups #129 (permanent guard) and #130 filed.
This commit is contained in:
2026-07-15 16:56:39 +01:00
parent 060bf524af
commit b4fe4985bf
4 changed files with 74 additions and 1 deletions

View File

@@ -432,6 +432,16 @@ Design/decision records and a running log of shipped work (items marked
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.
**Follow-up (same day):** pinning the label colour silently broke
`destructive-action` — adw-gtk3 derives only *that* background from
`currentColor` (`mix(@destructive_color, alpha(currentColor,…))`, where
suggested-action uses an opaque `mix(white,@accent_bg,…)`), so the dark
label dragged the background dark with it: "Delete" at 1.03:1, invisible,
in both polarities. Destructive backgrounds are now pinned to the same
opaque pastel ladder (enabled-only). V2: dialog rendered under boreal,
summer-night and summer-day. Lesson: a config-level assertion
("settings.ini says adw-gtk3-dark") cannot see a colour bug — only a
render can.
- ✓ **Suspend-then-hibernate (#115):** human decision — **1h** delay, **battery
only**, Preferences enable/disable. Mechanism: `suspend-then-hibernate` +
`HibernateDelaySec=1h` + `HibernateOnACPower=false`; lid