tokenise window-control colours + palette shadow
test / unit + widget + golden + a11y (push) Failing after 28s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / dart doc (lib API) (push) Failing after 1m2s
test / unit + widget + golden + a11y (push) Failing after 28s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / dart doc (lib API) (push) Failing after 1m2s
Hard-coded Windows close-button red (#E81123), white close glyph, and the palette's 0x40000000 drop shadow were the three colour sites the UX consultant flagged as not adapting per theme. Now they're `windowControl.closeHoverBackground` / `closeHoverForeground` / `shadow.ambient`. Paper themes override the shadow to a softer ink so it doesn't read as a CRT halo on cream. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -74,6 +74,11 @@ class SurfaceTokens {
|
||||
required this.modalOverlayBackground,
|
||||
required this.modalSurfaceBackground,
|
||||
required this.modalSurfaceBorder,
|
||||
// window controls
|
||||
required this.windowControlCloseHoverBackground,
|
||||
required this.windowControlCloseHoverForeground,
|
||||
// shadow
|
||||
required this.shadowAmbient,
|
||||
// divider
|
||||
required this.dividerColor,
|
||||
// status
|
||||
@@ -155,6 +160,17 @@ class SurfaceTokens {
|
||||
final Color modalSurfaceBackground;
|
||||
final Color modalSurfaceBorder;
|
||||
|
||||
/// Hover background on the Windows-style close button. Conventionally
|
||||
/// the destructive-action red even on dark themes that don't otherwise
|
||||
/// surface red as a CTA.
|
||||
final Color windowControlCloseHoverBackground;
|
||||
final Color windowControlCloseHoverForeground;
|
||||
|
||||
/// Ambient drop-shadow color for floating surfaces (palette,
|
||||
/// dropdowns, modals). Typically a translucent black on dark themes
|
||||
/// and a translucent ink on light themes.
|
||||
final Color shadowAmbient;
|
||||
|
||||
final Color dividerColor;
|
||||
|
||||
final Color statusSuccess;
|
||||
@@ -255,6 +271,13 @@ abstract class TokenKeys {
|
||||
static const modalSurfaceBackground = 'modal.surfaceBackground';
|
||||
static const modalSurfaceBorder = 'modal.surfaceBorder';
|
||||
|
||||
// window controls
|
||||
static const windowControlCloseHoverBackground = 'windowControl.closeHoverBackground';
|
||||
static const windowControlCloseHoverForeground = 'windowControl.closeHoverForeground';
|
||||
|
||||
// shadow
|
||||
static const shadowAmbient = 'shadow.ambient';
|
||||
|
||||
// divider
|
||||
static const dividerColor = 'divider.color';
|
||||
|
||||
@@ -325,6 +348,9 @@ abstract class TokenKeys {
|
||||
modalOverlayBackground,
|
||||
modalSurfaceBackground,
|
||||
modalSurfaceBorder,
|
||||
windowControlCloseHoverBackground,
|
||||
windowControlCloseHoverForeground,
|
||||
shadowAmbient,
|
||||
dividerColor,
|
||||
statusSuccess,
|
||||
statusWarning,
|
||||
|
||||
Reference in New Issue
Block a user