diff --git a/crates/behavior/src/grid.rs b/crates/behavior/src/grid.rs index b9c1e5bfd2..bd782a0e9c 100644 --- a/crates/behavior/src/grid.rs +++ b/crates/behavior/src/grid.rs @@ -119,10 +119,11 @@ impl GridCursor { cursor } - /// A cursor for the sweep that asks each column for its least: every column but a `Fixed` one is placed as a - /// `Content` column whose cells measure in no bound along x, so each column measures its widest cell. + /// A cursor for the sweep that asks each column for its least: the cells of every `Content` and `Fill` column + /// measure in no bound along x, so each column measures its widest cell. A `Fill` column stays one, so a child + /// that fills its width measures its own width there, where a `Content` column would hold it and take none. pub fn unbounded(flow: Flow, columns: &[ColumnWidth], gap: Vec2) -> Self { - let mut cursor = Self::new(flow, &as_content(columns), gap, &GridMeasure::default()); + let mut cursor = Self::new(flow, columns, gap, &GridMeasure::default()); cursor.unbounded = true; cursor } @@ -185,7 +186,7 @@ impl GridCursor { let count = self.columns.len().max(1); let (column, _, _, top) = self.next_place(); let width = match self.columns.get(column) { - Some(ColumnWidth::Content) if self.unbounded => f32::INFINITY, + Some(ColumnWidth::Content | ColumnWidth::Fill { .. }) if self.unbounded => f32::INFINITY, Some(ColumnWidth::Content) => { // Every other column keeps at least its least: a column that fills keeps only that, and so does a // content column when each column measures alone. diff --git a/crates/theme/src/tokens/color.rs b/crates/theme/src/tokens/color.rs index 2764753113..35e7a7916d 100644 --- a/crates/theme/src/tokens/color.rs +++ b/crates/theme/src/tokens/color.rs @@ -64,6 +64,9 @@ pub struct SurfaceColors { pub raised: Rgba, /// Fields and wells. pub sunken: Rgba, + /// The resting fill of a filled control (`Emphasis::Filled`): a neutral tile with no edge. Follows + /// `state.hover` unless pinned. + pub control: Rgba, /// The face of a knob that rides on a track: slider and switch thumbs. Light in both modes. pub knob: Rgba, /// Translucent cover behind modal surfaces. @@ -112,6 +115,8 @@ pub struct LineColors { pub border: Rgba, /// The boundary of a control that must be seen to be used (fields, checkboxes). pub control_edge: Rgba, + /// The edge of an outlined neutral control (an outline or soft button); follows `text.muted` unless pinned. + pub outline: Rgba, /// The outline of a `surface.knob` face; clear where the face stands out on its own (dark /// mode). pub knob_edge: Rgba, @@ -321,13 +326,14 @@ impl ColorTokens { chrome: c, raised: c, sunken: c, + control: c, knob: c, scrim: c, inverse: c, shadow: c, }, text: TextColors { normal: c, muted: c, faint: c, disabled: c, on_accent: c, on_strong: c, on_status: c, on_selected: c, on_inverse: c }, - line: LineColors { divider: c, border: c, control_edge: c, knob_edge: c, frame: c, mark: c, grip: c, focus: c }, + line: LineColors { divider: c, border: c, control_edge: c, outline: c, knob_edge: c, frame: c, mark: c, grip: c, focus: c }, accent: AccentColors { solid: c, hover: c, @@ -438,6 +444,8 @@ color_tokens! { SurfaceRaised = "surface.raised" => surface.raised; /// `surface.sunken` SurfaceSunken = "surface.sunken" => surface.sunken; + /// `surface.control` + SurfaceControl = "surface.control" => surface.control; /// `surface.knob` SurfaceKnob = "surface.knob" => surface.knob; /// `surface.scrim` @@ -470,6 +478,8 @@ color_tokens! { LineBorder = "line.border" => line.border; /// `line.control_edge` LineControlEdge = "line.control_edge" => line.control_edge; + /// `line.outline` + LineOutline = "line.outline" => line.outline; /// `line.knob_edge` LineKnobEdge = "line.knob_edge" => line.knob_edge; /// `line.frame` diff --git a/crates/theme/src/values.rs b/crates/theme/src/values.rs index e6feee4ffb..f99b78b45f 100644 --- a/crates/theme/src/values.rs +++ b/crates/theme/src/values.rs @@ -201,6 +201,8 @@ pub(super) fn source(token: ColorToken, mode: Mode) -> ColorSource { T::SurfaceChrome => Same(T::SurfacePanel), T::SurfaceRaised => Anchored(pick(4, 1)), T::SurfaceSunken => Anchored(1), + // A filled tile rests on the theme's own hover fill, so the pointer adds only its edge. + T::SurfaceControl => Same(T::StateHover), // Near white in both modes (dark: about 236/255), as macOS, GNOME and PhotoCraft knobs. A // knob face is not a background grey, so it stays on the curve. T::SurfaceKnob => Neutral(pick(12, 1)), @@ -223,6 +225,7 @@ pub(super) fn source(token: ColorToken, mode: Mode) -> ColorSource { T::LineDivider => Anchored(6), T::LineBorder => Anchored(7), T::LineControlEdge => Anchored(8), + T::LineOutline => Same(T::TextMuted), // A light knob needs an outline on a light panel (PhotoCraft's `text_dim`); on a dark one // its face is the edge. The Pro themes pin PhotoCraft's dark ring. T::LineKnobEdge => { @@ -385,6 +388,7 @@ const TEXT_BGS: &[Bg] = &[ Token(T::SurfaceChrome), Token(T::SurfaceRaised), Token(T::SurfaceSunken), + Token(T::SurfaceControl), Token(T::StateHover), Token(T::StatePressed), ]; diff --git a/crates/theme/src/variant.rs b/crates/theme/src/variant.rs index fb9d58b0d7..02046db83f 100644 --- a/crates/theme/src/variant.rs +++ b/crates/theme/src/variant.rs @@ -19,6 +19,8 @@ pub enum Emphasis { Outline, /// No fill or edge until a state fills it. Ghost, + /// A neutral tile (`surface.control`) with no edge at rest; the pointer and the press fill it by state and edge it. + Filled, } /// What a variant says about its subject. The one tone type of the component layer: messages, notices, badges and @@ -142,7 +144,7 @@ impl ToneTokens { soft_fill: T::SurfaceSunken, on_soft: T::TextNormal, fg: T::TextNormal, - edge: T::TextMuted, + edge: T::LineOutline, solid: T::TextMuted, solid_hover: T::TextMuted, solid_pressed: T::TextNormal, @@ -237,6 +239,16 @@ impl VariantLook { VariantLook::new(state_fill, text(fg)).muted(muted).edge(States::new(edge, lit, lit, c.line.divider)).radius(button) } Emphasis::Ghost => VariantLook::new(state_fill, text(fg)).muted(muted).radius(button).edge(flat(clear)), + // A neutral tile takes the control edge under the pointer and the accent's under the press; a toned one keeps + // its edge. Disabled, it dims as a solid one does. + Emphasis::Filled => { + let (lit, pressed) = if tone == Tone::Neutral { (c.line.control_edge, c.accent.border) } else { (edge, edge) }; + let dimmed = crate::derive::mix(c.surface.control, c.state.disabled_fill, DISABLED_SOLID_DIM); + VariantLook::new(States::new(c.surface.control, c.state.hover, c.state.pressed, dimmed), text(fg)) + .muted(muted) + .edge(States::new(clear, lit, pressed, clear)) + .radius(button) + } } } } diff --git a/crates/theme/tests/dumps/tokens/adwaita-dark-high-comfortable.txt b/crates/theme/tests/dumps/tokens/adwaita-dark-high-comfortable.txt index 5d1a23d50d..b9775df30a 100644 --- a/crates/theme/tests/dumps/tokens/adwaita-dark-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/adwaita-dark-high-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #36363aff surface.chrome = #2e2e32ff surface.raised = #404044ff surface.sunken = #404044ff +surface.control = #48484cff surface.knob = #ebebedff surface.scrim = #00000080 surface.inverse = #ebebedff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0dff line.divider = #18181bff line.border = #404044ff line.control_edge = #4c4c50ff +line.outline = #fafafcff line.knob_edge = #00000000 line.frame = #0d0d0dff line.mark = #cacbcfff diff --git a/crates/theme/tests/dumps/tokens/adwaita-dark-high-compact.txt b/crates/theme/tests/dumps/tokens/adwaita-dark-high-compact.txt index fe791bffa1..3473dc1141 100644 --- a/crates/theme/tests/dumps/tokens/adwaita-dark-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/adwaita-dark-high-compact.txt @@ -6,6 +6,7 @@ surface.panel = #36363aff surface.chrome = #2e2e32ff surface.raised = #404044ff surface.sunken = #404044ff +surface.control = #48484cff surface.knob = #ebebedff surface.scrim = #00000080 surface.inverse = #ebebedff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0dff line.divider = #18181bff line.border = #404044ff line.control_edge = #4c4c50ff +line.outline = #fafafcff line.knob_edge = #00000000 line.frame = #0d0d0dff line.mark = #cacbcfff diff --git a/crates/theme/tests/dumps/tokens/adwaita-dark-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/adwaita-dark-standard-comfortable.txt index af3f43df81..7c79ce22fb 100644 --- a/crates/theme/tests/dumps/tokens/adwaita-dark-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/adwaita-dark-standard-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #36363aff surface.chrome = #2e2e32ff surface.raised = #39393eff surface.sunken = #404044ff +surface.control = #48484cff surface.knob = #ebebedff surface.scrim = #00000080 surface.inverse = #ebebedff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0dff line.divider = #18181bff line.border = #404044ff line.control_edge = #4c4c50ff +line.outline = #c0c0c2ff line.knob_edge = #00000000 line.frame = #0d0d0dff line.mark = #a5a6aaff @@ -256,6 +258,7 @@ warning = text.faint on surface.panel: 3.83 < 4.50 warning = text.faint on surface.chrome: 4.30 < 4.50 warning = text.faint on surface.raised: 3.65 < 4.50 warning = text.faint on surface.sunken: 3.28 < 4.50 +warning = text.faint on surface.control: 2.90 < 4.50 warning = text.faint on state.hover: 2.90 < 4.50 warning = text.faint on state.pressed: 2.32 < 4.50 warning = text.on_accent on accent.solid: 3.77 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/adwaita-dark-standard-compact.txt b/crates/theme/tests/dumps/tokens/adwaita-dark-standard-compact.txt index 6488a67128..35e209a7cf 100644 --- a/crates/theme/tests/dumps/tokens/adwaita-dark-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/adwaita-dark-standard-compact.txt @@ -6,6 +6,7 @@ surface.panel = #36363aff surface.chrome = #2e2e32ff surface.raised = #39393eff surface.sunken = #404044ff +surface.control = #48484cff surface.knob = #ebebedff surface.scrim = #00000080 surface.inverse = #ebebedff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0dff line.divider = #18181bff line.border = #404044ff line.control_edge = #4c4c50ff +line.outline = #c0c0c2ff line.knob_edge = #00000000 line.frame = #0d0d0dff line.mark = #a5a6aaff @@ -256,6 +258,7 @@ warning = text.faint on surface.panel: 3.83 < 4.50 warning = text.faint on surface.chrome: 4.30 < 4.50 warning = text.faint on surface.raised: 3.65 < 4.50 warning = text.faint on surface.sunken: 3.28 < 4.50 +warning = text.faint on surface.control: 2.90 < 4.50 warning = text.faint on state.hover: 2.90 < 4.50 warning = text.faint on state.pressed: 2.32 < 4.50 warning = text.on_accent on accent.solid: 3.77 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/adwaita-light-high-comfortable.txt b/crates/theme/tests/dumps/tokens/adwaita-light-high-comfortable.txt index 2b6cd25930..2cccdc47d2 100644 --- a/crates/theme/tests/dumps/tokens/adwaita-light-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/adwaita-light-high-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #ffffffff surface.chrome = #ffffffff surface.raised = #ffffffff surface.sunken = #ebebedff +surface.control = #e2e2e5ff surface.knob = #fcfcfdff surface.scrim = #00000059 surface.inverse = #262628ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfdff line.divider = #dedee1ff line.border = #dadaddff line.control_edge = #dadaddff +line.outline = #403f43ff line.knob_edge = #403f43ff line.frame = #dadaddff line.mark = #5c5c60ff diff --git a/crates/theme/tests/dumps/tokens/adwaita-light-high-compact.txt b/crates/theme/tests/dumps/tokens/adwaita-light-high-compact.txt index e5a1956844..6bfe73ca8d 100644 --- a/crates/theme/tests/dumps/tokens/adwaita-light-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/adwaita-light-high-compact.txt @@ -6,6 +6,7 @@ surface.panel = #ffffffff surface.chrome = #ffffffff surface.raised = #ffffffff surface.sunken = #ebebedff +surface.control = #e2e2e5ff surface.knob = #fcfcfdff surface.scrim = #00000059 surface.inverse = #262628ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfdff line.divider = #dedee1ff line.border = #dadaddff line.control_edge = #dadaddff +line.outline = #403f43ff line.knob_edge = #403f43ff line.frame = #dadaddff line.mark = #5c5c60ff diff --git a/crates/theme/tests/dumps/tokens/adwaita-light-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/adwaita-light-standard-comfortable.txt index 5070d33508..407efd953a 100644 --- a/crates/theme/tests/dumps/tokens/adwaita-light-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/adwaita-light-standard-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #ffffffff surface.chrome = #ffffffff surface.raised = #ffffffff surface.sunken = #ebebedff +surface.control = #e2e2e5ff surface.knob = #fcfcfdff surface.scrim = #00000059 surface.inverse = #262628ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfdff line.divider = #dedee1ff line.border = #dadaddff line.control_edge = #dadaddff +line.outline = #646468ff line.knob_edge = #646468ff line.frame = #dadaddff line.mark = #78777cff @@ -256,6 +258,7 @@ warning = text.faint on surface.panel: 2.77 < 4.50 warning = text.faint on surface.chrome: 2.77 < 4.50 warning = text.faint on surface.raised: 2.77 < 4.50 warning = text.faint on surface.sunken: 2.32 < 4.50 +warning = text.faint on surface.control: 2.14 < 4.50 warning = text.faint on state.hover: 2.14 < 4.50 warning = text.faint on state.pressed: 1.87 < 4.50 warning = text.on_accent on accent.solid: 3.77 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/adwaita-light-standard-compact.txt b/crates/theme/tests/dumps/tokens/adwaita-light-standard-compact.txt index 842e67f436..259fec4249 100644 --- a/crates/theme/tests/dumps/tokens/adwaita-light-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/adwaita-light-standard-compact.txt @@ -6,6 +6,7 @@ surface.panel = #ffffffff surface.chrome = #ffffffff surface.raised = #ffffffff surface.sunken = #ebebedff +surface.control = #e2e2e5ff surface.knob = #fcfcfdff surface.scrim = #00000059 surface.inverse = #262628ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfdff line.divider = #dedee1ff line.border = #dadaddff line.control_edge = #dadaddff +line.outline = #646468ff line.knob_edge = #646468ff line.frame = #dadaddff line.mark = #78777cff @@ -256,6 +258,7 @@ warning = text.faint on surface.panel: 2.77 < 4.50 warning = text.faint on surface.chrome: 2.77 < 4.50 warning = text.faint on surface.raised: 2.77 < 4.50 warning = text.faint on surface.sunken: 2.32 < 4.50 +warning = text.faint on surface.control: 2.14 < 4.50 warning = text.faint on state.hover: 2.14 < 4.50 warning = text.faint on state.pressed: 1.87 < 4.50 warning = text.on_accent on accent.solid: 3.77 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/artcraft-dark-high-comfortable.txt b/crates/theme/tests/dumps/tokens/artcraft-dark-high-comfortable.txt index f0eecfcea1..72f92b55c7 100644 --- a/crates/theme/tests/dumps/tokens/artcraft-dark-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/artcraft-dark-high-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #535353ff surface.chrome = #535353ff surface.raised = #595959ff surface.sunken = #454545ff +surface.control = #595959ff surface.knob = #ebebebff surface.scrim = #00000080 surface.inverse = #ebebebff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0dff line.divider = #3e3e3eff line.border = #424242ff line.control_edge = #686868ff +line.outline = #ffffffff line.knob_edge = #282828ff line.frame = #0d0d0dff line.mark = #f4f4f4ff diff --git a/crates/theme/tests/dumps/tokens/artcraft-dark-high-compact.txt b/crates/theme/tests/dumps/tokens/artcraft-dark-high-compact.txt index 2d3c6d01c7..8f7404506e 100644 --- a/crates/theme/tests/dumps/tokens/artcraft-dark-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/artcraft-dark-high-compact.txt @@ -6,6 +6,7 @@ surface.panel = #535353ff surface.chrome = #535353ff surface.raised = #595959ff surface.sunken = #454545ff +surface.control = #595959ff surface.knob = #ebebebff surface.scrim = #00000080 surface.inverse = #ebebebff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0dff line.divider = #3e3e3eff line.border = #424242ff line.control_edge = #686868ff +line.outline = #ffffffff line.knob_edge = #282828ff line.frame = #0d0d0dff line.mark = #f4f4f4ff diff --git a/crates/theme/tests/dumps/tokens/artcraft-dark-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/artcraft-dark-standard-comfortable.txt index ce055072cd..2f6d4bf660 100644 --- a/crates/theme/tests/dumps/tokens/artcraft-dark-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/artcraft-dark-standard-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #535353ff surface.chrome = #535353ff surface.raised = #5c5c5cff surface.sunken = #454545ff +surface.control = #626262ff surface.knob = #ebebebff surface.scrim = #00000080 surface.inverse = #ebebebff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0dff line.divider = #3e3e3eff line.border = #424242ff line.control_edge = #686868ff +line.outline = #d4d4d4ff line.knob_edge = #282828ff line.frame = #0d0d0dff line.mark = #cacacaff @@ -254,6 +256,7 @@ warning = accent.solid on surface.panel: 2.30 < 3.00 warning = accent.solid on surface.raised: 2.00 < 3.00 warning = accent.solid on surface.sunken: 2.87 < 3.00 warning = text.normal on state.pressed: 4.27 < 4.50 +warning = text.muted on surface.control: 4.12 < 4.50 warning = text.muted on state.hover: 4.12 < 4.50 warning = text.muted on state.pressed: 3.34 < 4.50 warning = text.faint on surface.background: 3.84 < 4.50 @@ -261,6 +264,7 @@ warning = text.faint on surface.panel: 2.94 < 4.50 warning = text.faint on surface.chrome: 2.94 < 4.50 warning = text.faint on surface.raised: 2.56 < 4.50 warning = text.faint on surface.sunken: 3.67 < 4.50 +warning = text.faint on surface.control: 2.33 < 4.50 warning = text.faint on state.hover: 2.33 < 4.50 warning = text.faint on state.pressed: 1.89 < 4.50 warning = text.on_accent on accent.solid: 3.34 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/artcraft-dark-standard-compact.txt b/crates/theme/tests/dumps/tokens/artcraft-dark-standard-compact.txt index a2b9e32bfc..0b9ef0d530 100644 --- a/crates/theme/tests/dumps/tokens/artcraft-dark-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/artcraft-dark-standard-compact.txt @@ -6,6 +6,7 @@ surface.panel = #535353ff surface.chrome = #535353ff surface.raised = #5c5c5cff surface.sunken = #454545ff +surface.control = #626262ff surface.knob = #ebebebff surface.scrim = #00000080 surface.inverse = #ebebebff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0dff line.divider = #3e3e3eff line.border = #424242ff line.control_edge = #686868ff +line.outline = #d4d4d4ff line.knob_edge = #282828ff line.frame = #0d0d0dff line.mark = #cacacaff @@ -254,6 +256,7 @@ warning = accent.solid on surface.panel: 2.30 < 3.00 warning = accent.solid on surface.raised: 2.00 < 3.00 warning = accent.solid on surface.sunken: 2.87 < 3.00 warning = text.normal on state.pressed: 4.27 < 4.50 +warning = text.muted on surface.control: 4.12 < 4.50 warning = text.muted on state.hover: 4.12 < 4.50 warning = text.muted on state.pressed: 3.34 < 4.50 warning = text.faint on surface.background: 3.84 < 4.50 @@ -261,6 +264,7 @@ warning = text.faint on surface.panel: 2.94 < 4.50 warning = text.faint on surface.chrome: 2.94 < 4.50 warning = text.faint on surface.raised: 2.56 < 4.50 warning = text.faint on surface.sunken: 3.67 < 4.50 +warning = text.faint on surface.control: 2.33 < 4.50 warning = text.faint on state.hover: 2.33 < 4.50 warning = text.faint on state.pressed: 1.89 < 4.50 warning = text.on_accent on accent.solid: 3.34 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/artcraft-light-high-comfortable.txt b/crates/theme/tests/dumps/tokens/artcraft-light-high-comfortable.txt index ac1b8d28ed..17c3f20e58 100644 --- a/crates/theme/tests/dumps/tokens/artcraft-light-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/artcraft-light-high-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #f0f0f0ff surface.chrome = #f0f0f0ff surface.raised = #f6f6f6ff surface.sunken = #ffffffff +surface.control = #e2e2e2ff surface.knob = #fcfcfcff surface.scrim = #00000059 surface.inverse = #262626ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfcff line.divider = #d6d6d6ff line.border = #d6d6d6ff line.control_edge = #bababaff +line.outline = #3c3c3cff line.knob_edge = #282828ff line.frame = #bababaff line.mark = #585858ff diff --git a/crates/theme/tests/dumps/tokens/artcraft-light-high-compact.txt b/crates/theme/tests/dumps/tokens/artcraft-light-high-compact.txt index 134734f33d..f57a97bb24 100644 --- a/crates/theme/tests/dumps/tokens/artcraft-light-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/artcraft-light-high-compact.txt @@ -6,6 +6,7 @@ surface.panel = #f0f0f0ff surface.chrome = #f0f0f0ff surface.raised = #f6f6f6ff surface.sunken = #ffffffff +surface.control = #e2e2e2ff surface.knob = #fcfcfcff surface.scrim = #00000059 surface.inverse = #262626ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfcff line.divider = #d6d6d6ff line.border = #d6d6d6ff line.control_edge = #bababaff +line.outline = #3c3c3cff line.knob_edge = #282828ff line.frame = #bababaff line.mark = #585858ff diff --git a/crates/theme/tests/dumps/tokens/artcraft-light-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/artcraft-light-standard-comfortable.txt index aa7569104f..b903fb3d89 100644 --- a/crates/theme/tests/dumps/tokens/artcraft-light-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/artcraft-light-standard-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #f0f0f0ff surface.chrome = #f0f0f0ff surface.raised = #f6f6f6ff surface.sunken = #ffffffff +surface.control = #e2e2e2ff surface.knob = #fcfcfcff surface.scrim = #00000059 surface.inverse = #262626ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfcff line.divider = #d6d6d6ff line.border = #d6d6d6ff line.control_edge = #bababaff +line.outline = #404040ff line.knob_edge = #282828ff line.frame = #bababaff line.mark = #737373ff @@ -256,6 +258,7 @@ warning = text.faint on surface.panel: 3.87 < 4.50 warning = text.faint on surface.chrome: 3.87 < 4.50 warning = text.faint on surface.raised: 4.09 < 4.50 warning = text.faint on surface.sunken: 4.42 < 4.50 +warning = text.faint on surface.control: 3.41 < 4.50 warning = text.faint on state.hover: 3.41 < 4.50 warning = text.faint on state.pressed: 2.81 < 4.50 warning = text.on_accent on accent.solid: 3.34 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/artcraft-light-standard-compact.txt b/crates/theme/tests/dumps/tokens/artcraft-light-standard-compact.txt index c03751afd6..3af9fd4631 100644 --- a/crates/theme/tests/dumps/tokens/artcraft-light-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/artcraft-light-standard-compact.txt @@ -6,6 +6,7 @@ surface.panel = #f0f0f0ff surface.chrome = #f0f0f0ff surface.raised = #f6f6f6ff surface.sunken = #ffffffff +surface.control = #e2e2e2ff surface.knob = #fcfcfcff surface.scrim = #00000059 surface.inverse = #262626ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfcff line.divider = #d6d6d6ff line.border = #d6d6d6ff line.control_edge = #bababaff +line.outline = #404040ff line.knob_edge = #282828ff line.frame = #bababaff line.mark = #737373ff @@ -256,6 +258,7 @@ warning = text.faint on surface.panel: 3.87 < 4.50 warning = text.faint on surface.chrome: 3.87 < 4.50 warning = text.faint on surface.raised: 4.09 < 4.50 warning = text.faint on surface.sunken: 4.42 < 4.50 +warning = text.faint on surface.control: 3.41 < 4.50 warning = text.faint on state.hover: 3.41 < 4.50 warning = text.faint on state.pressed: 2.81 < 4.50 warning = text.on_accent on accent.solid: 3.34 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/breeze-dark-high-comfortable.txt b/crates/theme/tests/dumps/tokens/breeze-dark-high-comfortable.txt index 60712a3585..b3763445ed 100644 --- a/crates/theme/tests/dumps/tokens/breeze-dark-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/breeze-dark-high-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #1d2126ff surface.chrome = #262a30ff surface.raised = #272b30ff surface.sunken = #262a30ff +surface.control = #32363bff surface.knob = #e9ebeeff surface.scrim = #00000080 surface.inverse = #e9ebeeff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0dff line.divider = #2e3236ff line.border = #34383dff line.control_edge = #44494fff +line.outline = #ccd3daff line.knob_edge = #00000000 line.frame = #0d0d0dff line.mark = #a5a9b0ff diff --git a/crates/theme/tests/dumps/tokens/breeze-dark-high-compact.txt b/crates/theme/tests/dumps/tokens/breeze-dark-high-compact.txt index b4021b6576..c8dbe72541 100644 --- a/crates/theme/tests/dumps/tokens/breeze-dark-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/breeze-dark-high-compact.txt @@ -6,6 +6,7 @@ surface.panel = #1d2126ff surface.chrome = #262a30ff surface.raised = #272b30ff surface.sunken = #262a30ff +surface.control = #32363bff surface.knob = #e9ebeeff surface.scrim = #00000080 surface.inverse = #e9ebeeff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0dff line.divider = #2e3236ff line.border = #34383dff line.control_edge = #44494fff +line.outline = #ccd3daff line.knob_edge = #00000000 line.frame = #0d0d0dff line.mark = #a5a9b0ff diff --git a/crates/theme/tests/dumps/tokens/breeze-dark-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/breeze-dark-standard-comfortable.txt index 24760ee193..ae5183f13a 100644 --- a/crates/theme/tests/dumps/tokens/breeze-dark-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/breeze-dark-standard-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #1d2126ff surface.chrome = #262a30ff surface.raised = #272b30ff surface.sunken = #262a30ff +surface.control = #32363bff surface.knob = #e9ebeeff surface.scrim = #00000080 surface.inverse = #e9ebeeff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0dff line.divider = #2e3236ff line.border = #34383dff line.control_edge = #44494fff +line.outline = #c8ced5ff line.knob_edge = #00000000 line.frame = #0d0d0dff line.mark = #84898fff diff --git a/crates/theme/tests/dumps/tokens/breeze-dark-standard-compact.txt b/crates/theme/tests/dumps/tokens/breeze-dark-standard-compact.txt index 764eb548a7..2a8d84d2ae 100644 --- a/crates/theme/tests/dumps/tokens/breeze-dark-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/breeze-dark-standard-compact.txt @@ -6,6 +6,7 @@ surface.panel = #1d2126ff surface.chrome = #262a30ff surface.raised = #272b30ff surface.sunken = #262a30ff +surface.control = #32363bff surface.knob = #e9ebeeff surface.scrim = #00000080 surface.inverse = #e9ebeeff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0dff line.divider = #2e3236ff line.border = #34383dff line.control_edge = #44494fff +line.outline = #c8ced5ff line.knob_edge = #00000000 line.frame = #0d0d0dff line.mark = #84898fff diff --git a/crates/theme/tests/dumps/tokens/breeze-light-high-comfortable.txt b/crates/theme/tests/dumps/tokens/breeze-light-high-comfortable.txt index ba6752c505..f3bb516737 100644 --- a/crates/theme/tests/dumps/tokens/breeze-light-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/breeze-light-high-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #eceef1ff surface.chrome = #dbdee2ff surface.raised = #f2f4f7ff surface.sunken = #f9fafcff +surface.control = #e2e6ebff surface.knob = #fcfcfdff surface.scrim = #00000059 surface.inverse = #252729ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfdff line.divider = #d6dadeff line.border = #cbd0d5ff line.control_edge = #b8bfc6ff +line.outline = #363f48ff line.knob_edge = #363f48ff line.frame = #b8bfc6ff line.mark = #595d63ff diff --git a/crates/theme/tests/dumps/tokens/breeze-light-high-compact.txt b/crates/theme/tests/dumps/tokens/breeze-light-high-compact.txt index f75fbb1fb6..0f4b69e824 100644 --- a/crates/theme/tests/dumps/tokens/breeze-light-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/breeze-light-high-compact.txt @@ -6,6 +6,7 @@ surface.panel = #eceef1ff surface.chrome = #dbdee2ff surface.raised = #f2f4f7ff surface.sunken = #f9fafcff +surface.control = #e2e6ebff surface.knob = #fcfcfdff surface.scrim = #00000059 surface.inverse = #252729ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfdff line.divider = #d6dadeff line.border = #cbd0d5ff line.control_edge = #b8bfc6ff +line.outline = #363f48ff line.knob_edge = #363f48ff line.frame = #b8bfc6ff line.mark = #595d63ff diff --git a/crates/theme/tests/dumps/tokens/breeze-light-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/breeze-light-standard-comfortable.txt index 29ab888a8e..18bb48150d 100644 --- a/crates/theme/tests/dumps/tokens/breeze-light-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/breeze-light-standard-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #eceef1ff surface.chrome = #dbdee2ff surface.raised = #f2f4f7ff surface.sunken = #f9fafcff +surface.control = #e2e6ebff surface.knob = #fcfcfdff surface.scrim = #00000059 surface.inverse = #252729ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfdff line.divider = #d6dadeff line.border = #cbd0d5ff line.control_edge = #b8bfc6ff +line.outline = #363f48ff line.knob_edge = #363f48ff line.frame = #b8bfc6ff line.mark = #74797eff diff --git a/crates/theme/tests/dumps/tokens/breeze-light-standard-compact.txt b/crates/theme/tests/dumps/tokens/breeze-light-standard-compact.txt index b833a27ef3..b0303accff 100644 --- a/crates/theme/tests/dumps/tokens/breeze-light-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/breeze-light-standard-compact.txt @@ -6,6 +6,7 @@ surface.panel = #eceef1ff surface.chrome = #dbdee2ff surface.raised = #f2f4f7ff surface.sunken = #f9fafcff +surface.control = #e2e6ebff surface.knob = #fcfcfdff surface.scrim = #00000059 surface.inverse = #252729ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfdff line.divider = #d6dadeff line.border = #cbd0d5ff line.control_edge = #b8bfc6ff +line.outline = #363f48ff line.knob_edge = #363f48ff line.frame = #b8bfc6ff line.mark = #74797eff diff --git a/crates/theme/tests/dumps/tokens/classic-light-high-comfortable.txt b/crates/theme/tests/dumps/tokens/classic-light-high-comfortable.txt index 4ce8a9c7d6..13727cb0fa 100644 --- a/crates/theme/tests/dumps/tokens/classic-light-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/classic-light-high-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #d4d0c8ff surface.chrome = #d4d0c8ff surface.raised = #d4d0c8ff surface.sunken = #ffffffff +surface.control = #e2ded6ff surface.knob = #d4d0c8ff surface.scrim = #00000059 surface.inverse = #282624ff @@ -22,6 +23,7 @@ text.on_inverse = #fdfcfcff line.divider = #808080ff line.border = #808080ff line.control_edge = #808080ff +line.outline = #2e2e2eff line.knob_edge = #2e2e2eff line.frame = #808080ff line.mark = #4e4a44ff diff --git a/crates/theme/tests/dumps/tokens/classic-light-high-compact.txt b/crates/theme/tests/dumps/tokens/classic-light-high-compact.txt index 60d43c2588..066d41b5ff 100644 --- a/crates/theme/tests/dumps/tokens/classic-light-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/classic-light-high-compact.txt @@ -6,6 +6,7 @@ surface.panel = #d4d0c8ff surface.chrome = #d4d0c8ff surface.raised = #d4d0c8ff surface.sunken = #ffffffff +surface.control = #e2ded6ff surface.knob = #d4d0c8ff surface.scrim = #00000059 surface.inverse = #282624ff @@ -22,6 +23,7 @@ text.on_inverse = #fdfcfcff line.divider = #808080ff line.border = #808080ff line.control_edge = #808080ff +line.outline = #2e2e2eff line.knob_edge = #2e2e2eff line.frame = #808080ff line.mark = #4e4a44ff diff --git a/crates/theme/tests/dumps/tokens/classic-light-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/classic-light-standard-comfortable.txt index 340a328e51..2b68b4b3bc 100644 --- a/crates/theme/tests/dumps/tokens/classic-light-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/classic-light-standard-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #d4d0c8ff surface.chrome = #d4d0c8ff surface.raised = #d4d0c8ff surface.sunken = #ffffffff +surface.control = #e2ded6ff surface.knob = #d4d0c8ff surface.scrim = #00000059 surface.inverse = #282624ff @@ -22,6 +23,7 @@ text.on_inverse = #fdfcfcff line.divider = #808080ff line.border = #808080ff line.control_edge = #808080ff +line.outline = #404040ff line.knob_edge = #404040ff line.frame = #808080ff line.mark = #68655eff @@ -255,5 +257,6 @@ warning = text.faint on surface.panel: 2.57 < 4.50 warning = text.faint on surface.chrome: 2.57 < 4.50 warning = text.faint on surface.raised: 2.57 < 4.50 warning = text.faint on surface.sunken: 3.95 < 4.50 +warning = text.faint on surface.control: 2.94 < 4.50 warning = text.faint on state.hover: 2.94 < 4.50 warning = text.faint on state.pressed: 2.04 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/classic-light-standard-compact.txt b/crates/theme/tests/dumps/tokens/classic-light-standard-compact.txt index 79c77b1d7c..36bb43ae8a 100644 --- a/crates/theme/tests/dumps/tokens/classic-light-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/classic-light-standard-compact.txt @@ -6,6 +6,7 @@ surface.panel = #d4d0c8ff surface.chrome = #d4d0c8ff surface.raised = #d4d0c8ff surface.sunken = #ffffffff +surface.control = #e2ded6ff surface.knob = #d4d0c8ff surface.scrim = #00000059 surface.inverse = #282624ff @@ -22,6 +23,7 @@ text.on_inverse = #fdfcfcff line.divider = #808080ff line.border = #808080ff line.control_edge = #808080ff +line.outline = #404040ff line.knob_edge = #404040ff line.frame = #808080ff line.mark = #68655eff @@ -255,5 +257,6 @@ warning = text.faint on surface.panel: 2.57 < 4.50 warning = text.faint on surface.chrome: 2.57 < 4.50 warning = text.faint on surface.raised: 2.57 < 4.50 warning = text.faint on surface.sunken: 3.95 < 4.50 +warning = text.faint on surface.control: 2.94 < 4.50 warning = text.faint on state.hover: 2.94 < 4.50 warning = text.faint on state.pressed: 2.04 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/graphite-dark-high-comfortable.txt b/crates/theme/tests/dumps/tokens/graphite-dark-high-comfortable.txt index b9d505a782..e0e59ac2f2 100644 --- a/crates/theme/tests/dumps/tokens/graphite-dark-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/graphite-dark-high-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #26262aff surface.chrome = #26262aff surface.raised = #2e2e33ff surface.sunken = #131317ff +surface.control = #303034ff surface.knob = #ebebedff surface.scrim = #00000080 surface.inverse = #ebebedff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0dff line.divider = #47474cff line.border = #3c3c43ff line.control_edge = #77777cff +line.outline = #cacbd3ff line.knob_edge = #00000000 line.frame = #0d0d0dff line.mark = #a3a3a7ff diff --git a/crates/theme/tests/dumps/tokens/graphite-dark-high-compact.txt b/crates/theme/tests/dumps/tokens/graphite-dark-high-compact.txt index e1cad0d557..d0d601bedc 100644 --- a/crates/theme/tests/dumps/tokens/graphite-dark-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/graphite-dark-high-compact.txt @@ -6,6 +6,7 @@ surface.panel = #26262aff surface.chrome = #26262aff surface.raised = #2e2e33ff surface.sunken = #131317ff +surface.control = #303034ff surface.knob = #ebebedff surface.scrim = #00000080 surface.inverse = #ebebedff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0dff line.divider = #47474cff line.border = #3c3c43ff line.control_edge = #77777cff +line.outline = #cacbd3ff line.knob_edge = #00000000 line.frame = #0d0d0dff line.mark = #a3a3a7ff diff --git a/crates/theme/tests/dumps/tokens/graphite-dark-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/graphite-dark-standard-comfortable.txt index 903c5ba99b..4b8f20dd78 100644 --- a/crates/theme/tests/dumps/tokens/graphite-dark-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/graphite-dark-standard-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #26262aff surface.chrome = #26262aff surface.raised = #2e2e33ff surface.sunken = #131317ff +surface.control = #303034ff surface.knob = #ebebedff surface.scrim = #00000080 surface.inverse = #ebebedff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0dff line.divider = #47474cff line.border = #3c3c43ff line.control_edge = #77777cff +line.outline = #aeaeb6ff line.knob_edge = #00000000 line.frame = #0d0d0dff line.mark = #838388ff diff --git a/crates/theme/tests/dumps/tokens/graphite-dark-standard-compact.txt b/crates/theme/tests/dumps/tokens/graphite-dark-standard-compact.txt index b138c92043..1072f5fb83 100644 --- a/crates/theme/tests/dumps/tokens/graphite-dark-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/graphite-dark-standard-compact.txt @@ -6,6 +6,7 @@ surface.panel = #26262aff surface.chrome = #26262aff surface.raised = #2e2e33ff surface.sunken = #131317ff +surface.control = #303034ff surface.knob = #ebebedff surface.scrim = #00000080 surface.inverse = #ebebedff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0dff line.divider = #47474cff line.border = #3c3c43ff line.control_edge = #77777cff +line.outline = #aeaeb6ff line.knob_edge = #00000000 line.frame = #0d0d0dff line.mark = #838388ff diff --git a/crates/theme/tests/dumps/tokens/graphite-light-high-comfortable.txt b/crates/theme/tests/dumps/tokens/graphite-light-high-comfortable.txt index 78c9803a90..95496cba80 100644 --- a/crates/theme/tests/dumps/tokens/graphite-light-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/graphite-light-high-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #ffffffff surface.chrome = #ffffffff surface.raised = #ffffffff surface.sunken = #ffffffff +surface.control = #f7f7f7ff surface.knob = #fcfcfdff surface.scrim = #00000059 surface.inverse = #262628ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfdff line.divider = #d9d9d9ff line.border = #dadadeff line.control_edge = #b2b2b2ff +line.outline = #4f4f56ff line.knob_edge = #4f4f56ff line.frame = #b2b2b2ff line.mark = #6c6c71ff diff --git a/crates/theme/tests/dumps/tokens/graphite-light-high-compact.txt b/crates/theme/tests/dumps/tokens/graphite-light-high-compact.txt index f83ed82957..7f321c715a 100644 --- a/crates/theme/tests/dumps/tokens/graphite-light-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/graphite-light-high-compact.txt @@ -6,6 +6,7 @@ surface.panel = #ffffffff surface.chrome = #ffffffff surface.raised = #ffffffff surface.sunken = #ffffffff +surface.control = #f7f7f7ff surface.knob = #fcfcfdff surface.scrim = #00000059 surface.inverse = #262628ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfdff line.divider = #d9d9d9ff line.border = #dadadeff line.control_edge = #b2b2b2ff +line.outline = #4f4f56ff line.knob_edge = #4f4f56ff line.frame = #b2b2b2ff line.mark = #6c6c71ff diff --git a/crates/theme/tests/dumps/tokens/graphite-light-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/graphite-light-standard-comfortable.txt index d1bfd929bc..d4a16141c3 100644 --- a/crates/theme/tests/dumps/tokens/graphite-light-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/graphite-light-standard-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #ffffffff surface.chrome = #ffffffff surface.raised = #ffffffff surface.sunken = #ffffffff +surface.control = #f7f7f7ff surface.knob = #fcfcfdff surface.scrim = #00000059 surface.inverse = #262628ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfdff line.divider = #d9d9d9ff line.border = #dadadeff line.control_edge = #b2b2b2ff +line.outline = #5e5e66ff line.knob_edge = #5e5e66ff line.frame = #b2b2b2ff line.mark = #89898eff diff --git a/crates/theme/tests/dumps/tokens/graphite-light-standard-compact.txt b/crates/theme/tests/dumps/tokens/graphite-light-standard-compact.txt index 71b3f318d5..7010fd5072 100644 --- a/crates/theme/tests/dumps/tokens/graphite-light-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/graphite-light-standard-compact.txt @@ -6,6 +6,7 @@ surface.panel = #ffffffff surface.chrome = #ffffffff surface.raised = #ffffffff surface.sunken = #ffffffff +surface.control = #f7f7f7ff surface.knob = #fcfcfdff surface.scrim = #00000059 surface.inverse = #262628ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfdff line.divider = #d9d9d9ff line.border = #dadadeff line.control_edge = #b2b2b2ff +line.outline = #5e5e66ff line.knob_edge = #5e5e66ff line.frame = #b2b2b2ff line.mark = #89898eff diff --git a/crates/theme/tests/dumps/tokens/pro-dark-high-comfortable.txt b/crates/theme/tests/dumps/tokens/pro-dark-high-comfortable.txt index 5be55aa62a..68e27a0bf2 100644 --- a/crates/theme/tests/dumps/tokens/pro-dark-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/pro-dark-high-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #323232ff surface.chrome = #323232ff surface.raised = #3c3c3cff surface.sunken = #242424ff +surface.control = #424242ff surface.knob = #ebebebff surface.scrim = #00000080 surface.inverse = #ebebebff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0dff line.divider = #1e1e1eff line.border = #1e1e1eff line.control_edge = #4a4a4aff +line.outline = #ecececff line.knob_edge = #282828ff line.frame = #0d0d0dff line.mark = #bfbfbfff diff --git a/crates/theme/tests/dumps/tokens/pro-dark-high-compact.txt b/crates/theme/tests/dumps/tokens/pro-dark-high-compact.txt index de51e0f92f..5378f8d1ad 100644 --- a/crates/theme/tests/dumps/tokens/pro-dark-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/pro-dark-high-compact.txt @@ -6,6 +6,7 @@ surface.panel = #323232ff surface.chrome = #323232ff surface.raised = #3c3c3cff surface.sunken = #242424ff +surface.control = #424242ff surface.knob = #ebebebff surface.scrim = #00000080 surface.inverse = #ebebebff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0dff line.divider = #1e1e1eff line.border = #1e1e1eff line.control_edge = #4a4a4aff +line.outline = #ecececff line.knob_edge = #282828ff line.frame = #0d0d0dff line.mark = #bfbfbfff diff --git a/crates/theme/tests/dumps/tokens/pro-dark-standard-comfortable-app-sizes.txt b/crates/theme/tests/dumps/tokens/pro-dark-standard-comfortable-app-sizes.txt index c2eaff5bf5..eb4dc5245b 100644 --- a/crates/theme/tests/dumps/tokens/pro-dark-standard-comfortable-app-sizes.txt +++ b/crates/theme/tests/dumps/tokens/pro-dark-standard-comfortable-app-sizes.txt @@ -6,6 +6,7 @@ surface.panel = #323232ff surface.chrome = #323232ff surface.raised = #3c3c3cff surface.sunken = #242424ff +surface.control = #424242ff surface.knob = #ebebebff surface.scrim = #00000080 surface.inverse = #ebebebff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0dff line.divider = #1e1e1eff line.border = #1e1e1eff line.control_edge = #4a4a4aff +line.outline = #b2b2b2ff line.knob_edge = #282828ff line.frame = #0d0d0dff line.mark = #9c9c9cff @@ -256,6 +258,7 @@ warning = text.faint on surface.panel: 3.25 < 4.50 warning = text.faint on surface.chrome: 3.25 < 4.50 warning = text.faint on surface.raised: 2.79 < 4.50 warning = text.faint on surface.sunken: 3.93 < 4.50 +warning = text.faint on surface.control: 2.54 < 4.50 warning = text.faint on state.hover: 2.54 < 4.50 warning = text.faint on state.pressed: 2.11 < 4.50 warning = status.bad.fg on surface.panel: 3.81 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/pro-dark-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/pro-dark-standard-comfortable.txt index 81b473467c..2006a70008 100644 --- a/crates/theme/tests/dumps/tokens/pro-dark-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/pro-dark-standard-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #323232ff surface.chrome = #323232ff surface.raised = #3c3c3cff surface.sunken = #242424ff +surface.control = #424242ff surface.knob = #ebebebff surface.scrim = #00000080 surface.inverse = #ebebebff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0dff line.divider = #1e1e1eff line.border = #1e1e1eff line.control_edge = #4a4a4aff +line.outline = #b2b2b2ff line.knob_edge = #282828ff line.frame = #0d0d0dff line.mark = #9c9c9cff @@ -256,6 +258,7 @@ warning = text.faint on surface.panel: 3.25 < 4.50 warning = text.faint on surface.chrome: 3.25 < 4.50 warning = text.faint on surface.raised: 2.79 < 4.50 warning = text.faint on surface.sunken: 3.93 < 4.50 +warning = text.faint on surface.control: 2.54 < 4.50 warning = text.faint on state.hover: 2.54 < 4.50 warning = text.faint on state.pressed: 2.11 < 4.50 warning = status.bad.fg on surface.panel: 3.81 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/pro-dark-standard-compact.txt b/crates/theme/tests/dumps/tokens/pro-dark-standard-compact.txt index 080fa80352..a72a2ce930 100644 --- a/crates/theme/tests/dumps/tokens/pro-dark-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/pro-dark-standard-compact.txt @@ -6,6 +6,7 @@ surface.panel = #323232ff surface.chrome = #323232ff surface.raised = #3c3c3cff surface.sunken = #242424ff +surface.control = #424242ff surface.knob = #ebebebff surface.scrim = #00000080 surface.inverse = #ebebebff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0dff line.divider = #1e1e1eff line.border = #1e1e1eff line.control_edge = #4a4a4aff +line.outline = #b2b2b2ff line.knob_edge = #282828ff line.frame = #0d0d0dff line.mark = #9c9c9cff @@ -256,6 +258,7 @@ warning = text.faint on surface.panel: 3.25 < 4.50 warning = text.faint on surface.chrome: 3.25 < 4.50 warning = text.faint on surface.raised: 2.79 < 4.50 warning = text.faint on surface.sunken: 3.93 < 4.50 +warning = text.faint on surface.control: 2.54 < 4.50 warning = text.faint on state.hover: 2.54 < 4.50 warning = text.faint on state.pressed: 2.11 < 4.50 warning = status.bad.fg on surface.panel: 3.81 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/pro-light-gray-light-high-comfortable.txt b/crates/theme/tests/dumps/tokens/pro-light-gray-light-high-comfortable.txt index cdfa675c6d..aa80bb3ec8 100644 --- a/crates/theme/tests/dumps/tokens/pro-light-gray-light-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/pro-light-gray-light-high-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #b8b8b8ff surface.chrome = #b8b8b8ff surface.raised = #bdbdbdff surface.sunken = #d6d6d6ff +surface.control = #c6c6c6ff surface.knob = #fcfcfcff surface.scrim = #00000059 surface.inverse = #262626ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfcff line.divider = #9e9e9eff line.border = #a0a0a0ff line.control_edge = #8c8c8cff +line.outline = #1e1e1eff line.knob_edge = #282828ff line.frame = #8c8c8cff line.mark = #3f3f3fff diff --git a/crates/theme/tests/dumps/tokens/pro-light-gray-light-high-compact.txt b/crates/theme/tests/dumps/tokens/pro-light-gray-light-high-compact.txt index 2b5a5f71c9..6c2d5ac981 100644 --- a/crates/theme/tests/dumps/tokens/pro-light-gray-light-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/pro-light-gray-light-high-compact.txt @@ -6,6 +6,7 @@ surface.panel = #b8b8b8ff surface.chrome = #b8b8b8ff surface.raised = #bdbdbdff surface.sunken = #d6d6d6ff +surface.control = #c6c6c6ff surface.knob = #fcfcfcff surface.scrim = #00000059 surface.inverse = #262626ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfcff line.divider = #9e9e9eff line.border = #a0a0a0ff line.control_edge = #8c8c8cff +line.outline = #1e1e1eff line.knob_edge = #282828ff line.frame = #8c8c8cff line.mark = #3f3f3fff diff --git a/crates/theme/tests/dumps/tokens/pro-light-gray-light-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/pro-light-gray-light-standard-comfortable.txt index 56e08dc89b..a056292cd7 100644 --- a/crates/theme/tests/dumps/tokens/pro-light-gray-light-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/pro-light-gray-light-standard-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #b8b8b8ff surface.chrome = #b8b8b8ff surface.raised = #bdbdbdff surface.sunken = #d6d6d6ff +surface.control = #c6c6c6ff surface.knob = #fcfcfcff surface.scrim = #00000059 surface.inverse = #262626ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfcff line.divider = #9e9e9eff line.border = #a0a0a0ff line.control_edge = #8c8c8cff +line.outline = #343434ff line.knob_edge = #282828ff line.frame = #8c8c8cff line.mark = #595959ff @@ -258,6 +260,7 @@ warning = text.faint on surface.panel: 3.17 < 4.50 warning = text.faint on surface.chrome: 3.17 < 4.50 warning = text.faint on surface.raised: 3.35 < 4.50 warning = text.faint on surface.sunken: 4.33 < 4.50 +warning = text.faint on surface.control: 3.68 < 4.50 warning = text.faint on state.hover: 3.68 < 4.50 warning = text.faint on state.pressed: 2.71 < 4.50 warning = text.on_accent on accent.solid: 3.34 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/pro-light-gray-light-standard-compact.txt b/crates/theme/tests/dumps/tokens/pro-light-gray-light-standard-compact.txt index dbc1526008..0432039e9b 100644 --- a/crates/theme/tests/dumps/tokens/pro-light-gray-light-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/pro-light-gray-light-standard-compact.txt @@ -6,6 +6,7 @@ surface.panel = #b8b8b8ff surface.chrome = #b8b8b8ff surface.raised = #bdbdbdff surface.sunken = #d6d6d6ff +surface.control = #c6c6c6ff surface.knob = #fcfcfcff surface.scrim = #00000059 surface.inverse = #262626ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfcff line.divider = #9e9e9eff line.border = #a0a0a0ff line.control_edge = #8c8c8cff +line.outline = #343434ff line.knob_edge = #282828ff line.frame = #8c8c8cff line.mark = #595959ff @@ -258,6 +260,7 @@ warning = text.faint on surface.panel: 3.17 < 4.50 warning = text.faint on surface.chrome: 3.17 < 4.50 warning = text.faint on surface.raised: 3.35 < 4.50 warning = text.faint on surface.sunken: 4.33 < 4.50 +warning = text.faint on surface.control: 3.68 < 4.50 warning = text.faint on state.hover: 3.68 < 4.50 warning = text.faint on state.pressed: 2.71 < 4.50 warning = text.on_accent on accent.solid: 3.34 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/pro-light-high-comfortable.txt b/crates/theme/tests/dumps/tokens/pro-light-high-comfortable.txt index 22be98be15..3fb00c5b05 100644 --- a/crates/theme/tests/dumps/tokens/pro-light-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/pro-light-high-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #f0f0f0ff surface.chrome = #f0f0f0ff surface.raised = #f6f6f6ff surface.sunken = #ffffffff +surface.control = #e2e2e2ff surface.knob = #fcfcfcff surface.scrim = #00000059 surface.inverse = #262626ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfcff line.divider = #d6d6d6ff line.border = #d6d6d6ff line.control_edge = #bababaff +line.outline = #3c3c3cff line.knob_edge = #282828ff line.frame = #bababaff line.mark = #585858ff diff --git a/crates/theme/tests/dumps/tokens/pro-light-high-compact.txt b/crates/theme/tests/dumps/tokens/pro-light-high-compact.txt index 38bc280822..9cb3857e54 100644 --- a/crates/theme/tests/dumps/tokens/pro-light-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/pro-light-high-compact.txt @@ -6,6 +6,7 @@ surface.panel = #f0f0f0ff surface.chrome = #f0f0f0ff surface.raised = #f6f6f6ff surface.sunken = #ffffffff +surface.control = #e2e2e2ff surface.knob = #fcfcfcff surface.scrim = #00000059 surface.inverse = #262626ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfcff line.divider = #d6d6d6ff line.border = #d6d6d6ff line.control_edge = #bababaff +line.outline = #3c3c3cff line.knob_edge = #282828ff line.frame = #bababaff line.mark = #585858ff diff --git a/crates/theme/tests/dumps/tokens/pro-light-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/pro-light-standard-comfortable.txt index e876cec316..aee7987759 100644 --- a/crates/theme/tests/dumps/tokens/pro-light-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/pro-light-standard-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #f0f0f0ff surface.chrome = #f0f0f0ff surface.raised = #f6f6f6ff surface.sunken = #ffffffff +surface.control = #e2e2e2ff surface.knob = #fcfcfcff surface.scrim = #00000059 surface.inverse = #262626ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfcff line.divider = #d6d6d6ff line.border = #d6d6d6ff line.control_edge = #bababaff +line.outline = #404040ff line.knob_edge = #282828ff line.frame = #bababaff line.mark = #737373ff @@ -256,6 +258,7 @@ warning = text.faint on surface.panel: 3.87 < 4.50 warning = text.faint on surface.chrome: 3.87 < 4.50 warning = text.faint on surface.raised: 4.09 < 4.50 warning = text.faint on surface.sunken: 4.42 < 4.50 +warning = text.faint on surface.control: 3.41 < 4.50 warning = text.faint on state.hover: 3.41 < 4.50 warning = text.faint on state.pressed: 2.81 < 4.50 warning = text.on_accent on accent.solid: 3.34 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/pro-light-standard-compact.txt b/crates/theme/tests/dumps/tokens/pro-light-standard-compact.txt index 8203da6e6e..97f1148052 100644 --- a/crates/theme/tests/dumps/tokens/pro-light-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/pro-light-standard-compact.txt @@ -6,6 +6,7 @@ surface.panel = #f0f0f0ff surface.chrome = #f0f0f0ff surface.raised = #f6f6f6ff surface.sunken = #ffffffff +surface.control = #e2e2e2ff surface.knob = #fcfcfcff surface.scrim = #00000059 surface.inverse = #262626ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfcff line.divider = #d6d6d6ff line.border = #d6d6d6ff line.control_edge = #bababaff +line.outline = #404040ff line.knob_edge = #282828ff line.frame = #bababaff line.mark = #737373ff @@ -256,6 +258,7 @@ warning = text.faint on surface.panel: 3.87 < 4.50 warning = text.faint on surface.chrome: 3.87 < 4.50 warning = text.faint on surface.raised: 4.09 < 4.50 warning = text.faint on surface.sunken: 4.42 < 4.50 +warning = text.faint on surface.control: 3.41 < 4.50 warning = text.faint on state.hover: 3.41 < 4.50 warning = text.faint on state.pressed: 2.81 < 4.50 warning = text.on_accent on accent.solid: 3.34 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/soft-dark-high-comfortable.txt b/crates/theme/tests/dumps/tokens/soft-dark-high-comfortable.txt index f57a891388..2105907f30 100644 --- a/crates/theme/tests/dumps/tokens/soft-dark-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/soft-dark-high-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #363640ff surface.chrome = #3a3a44ff surface.raised = #40404bff surface.sunken = #40404bff +surface.control = #444450ff surface.knob = #eaeaf0ff surface.scrim = #00000080 surface.inverse = #eaeaf0ff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0eff line.divider = #24242cff line.border = #464652ff line.control_edge = #545462ff +line.outline = #e5e6f2ff line.knob_edge = #00000000 line.frame = #0d0d0eff line.mark = #b8bac5ff diff --git a/crates/theme/tests/dumps/tokens/soft-dark-high-compact.txt b/crates/theme/tests/dumps/tokens/soft-dark-high-compact.txt index 1f7c5de6b4..77f6ccdf66 100644 --- a/crates/theme/tests/dumps/tokens/soft-dark-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/soft-dark-high-compact.txt @@ -6,6 +6,7 @@ surface.panel = #363640ff surface.chrome = #3a3a44ff surface.raised = #40404bff surface.sunken = #40404bff +surface.control = #444450ff surface.knob = #eaeaf0ff surface.scrim = #00000080 surface.inverse = #eaeaf0ff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0eff line.divider = #24242cff line.border = #464652ff line.control_edge = #545462ff +line.outline = #e5e6f2ff line.knob_edge = #00000000 line.frame = #0d0d0eff line.mark = #b8bac5ff diff --git a/crates/theme/tests/dumps/tokens/soft-dark-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/soft-dark-standard-comfortable.txt index 707f88624d..69a634cf7d 100644 --- a/crates/theme/tests/dumps/tokens/soft-dark-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/soft-dark-standard-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #363640ff surface.chrome = #3a3a44ff surface.raised = #40404bff surface.sunken = #40404bff +surface.control = #444450ff surface.knob = #eaeaf0ff surface.scrim = #00000080 surface.inverse = #eaeaf0ff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0eff line.divider = #24242cff line.border = #464652ff line.control_edge = #545462ff +line.outline = #d4d4e0ff line.knob_edge = #00000000 line.frame = #0d0d0eff line.mark = #9697a1ff diff --git a/crates/theme/tests/dumps/tokens/soft-dark-standard-compact.txt b/crates/theme/tests/dumps/tokens/soft-dark-standard-compact.txt index 9b2f4f0602..d535ed6bac 100644 --- a/crates/theme/tests/dumps/tokens/soft-dark-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/soft-dark-standard-compact.txt @@ -6,6 +6,7 @@ surface.panel = #363640ff surface.chrome = #3a3a44ff surface.raised = #40404bff surface.sunken = #40404bff +surface.control = #444450ff surface.knob = #eaeaf0ff surface.scrim = #00000080 surface.inverse = #eaeaf0ff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0eff line.divider = #24242cff line.border = #464652ff line.control_edge = #545462ff +line.outline = #d4d4e0ff line.knob_edge = #00000000 line.frame = #0d0d0eff line.mark = #9697a1ff diff --git a/crates/theme/tests/dumps/tokens/soft-light-high-comfortable.txt b/crates/theme/tests/dumps/tokens/soft-light-high-comfortable.txt index d038a9703f..d3052e3dcc 100644 --- a/crates/theme/tests/dumps/tokens/soft-light-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/soft-light-high-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #f0eef3ff surface.chrome = #e8e6ecff surface.raised = #f6f4f9ff surface.sunken = #faf9fcff +surface.control = #e4e2eaff surface.knob = #fcfcfdff surface.scrim = #00000059 surface.inverse = #272628ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfdff line.divider = #d2cfdaff line.border = #d0cdd7ff line.control_edge = #bebbc9ff +line.outline = #3e3c4cff line.knob_edge = #3e3c4cff line.frame = #bebbc9ff line.mark = #5b5b5eff diff --git a/crates/theme/tests/dumps/tokens/soft-light-high-compact.txt b/crates/theme/tests/dumps/tokens/soft-light-high-compact.txt index 72be511200..ba3c5a1ba7 100644 --- a/crates/theme/tests/dumps/tokens/soft-light-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/soft-light-high-compact.txt @@ -6,6 +6,7 @@ surface.panel = #f0eef3ff surface.chrome = #e8e6ecff surface.raised = #f6f4f9ff surface.sunken = #faf9fcff +surface.control = #e4e2eaff surface.knob = #fcfcfdff surface.scrim = #00000059 surface.inverse = #272628ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfdff line.divider = #d2cfdaff line.border = #d0cdd7ff line.control_edge = #bebbc9ff +line.outline = #3e3c4cff line.knob_edge = #3e3c4cff line.frame = #bebbc9ff line.mark = #5b5b5eff diff --git a/crates/theme/tests/dumps/tokens/soft-light-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/soft-light-standard-comfortable.txt index d89410361b..2ca46e3628 100644 --- a/crates/theme/tests/dumps/tokens/soft-light-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/soft-light-standard-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #f0eef3ff surface.chrome = #e8e6ecff surface.raised = #f6f4f9ff surface.sunken = #faf9fcff +surface.control = #e4e2eaff surface.knob = #fcfcfdff surface.scrim = #00000059 surface.inverse = #272628ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfdff line.divider = #d2cfdaff line.border = #d0cdd7ff line.control_edge = #bebbc9ff +line.outline = #3e3c4cff line.knob_edge = #3e3c4cff line.frame = #bebbc9ff line.mark = #777679ff diff --git a/crates/theme/tests/dumps/tokens/soft-light-standard-compact.txt b/crates/theme/tests/dumps/tokens/soft-light-standard-compact.txt index 01b162c404..3e5f7d544c 100644 --- a/crates/theme/tests/dumps/tokens/soft-light-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/soft-light-standard-compact.txt @@ -6,6 +6,7 @@ surface.panel = #f0eef3ff surface.chrome = #e8e6ecff surface.raised = #f6f4f9ff surface.sunken = #faf9fcff +surface.control = #e4e2eaff surface.knob = #fcfcfdff surface.scrim = #00000059 surface.inverse = #272628ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfdff line.divider = #d2cfdaff line.border = #d0cdd7ff line.control_edge = #bebbc9ff +line.outline = #3e3c4cff line.knob_edge = #3e3c4cff line.frame = #bebbc9ff line.mark = #777679ff diff --git a/crates/theme/tests/dumps/tokens/solarized-dark-dark-high-comfortable.txt b/crates/theme/tests/dumps/tokens/solarized-dark-dark-high-comfortable.txt index b0e805d0c0..81709fae15 100644 --- a/crates/theme/tests/dumps/tokens/solarized-dark-dark-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/solarized-dark-dark-high-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #073642ff surface.chrome = #073642ff surface.raised = #15414dff surface.sunken = #00252fff +surface.control = #0e4a5aff surface.knob = #e2edf1ff surface.scrim = #00000080 surface.inverse = #e2edf1ff @@ -22,6 +23,7 @@ text.on_inverse = #0c0d0eff line.divider = #00252fff line.border = #00252fff line.control_edge = #15505fff +line.outline = #ddf6ffff line.knob_edge = #00000000 line.frame = #0c0d0eff line.mark = #b0c8cfff diff --git a/crates/theme/tests/dumps/tokens/solarized-dark-dark-high-compact.txt b/crates/theme/tests/dumps/tokens/solarized-dark-dark-high-compact.txt index 01310a50b1..52074cba6f 100644 --- a/crates/theme/tests/dumps/tokens/solarized-dark-dark-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/solarized-dark-dark-high-compact.txt @@ -6,6 +6,7 @@ surface.panel = #073642ff surface.chrome = #073642ff surface.raised = #15414dff surface.sunken = #00252fff +surface.control = #0e4a5aff surface.knob = #e2edf1ff surface.scrim = #00000080 surface.inverse = #e2edf1ff @@ -22,6 +23,7 @@ text.on_inverse = #0c0d0eff line.divider = #00252fff line.border = #00252fff line.control_edge = #15505fff +line.outline = #ddf6ffff line.knob_edge = #00000000 line.frame = #0c0d0eff line.mark = #b0c8cfff diff --git a/crates/theme/tests/dumps/tokens/solarized-dark-dark-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/solarized-dark-dark-standard-comfortable.txt index 577065c0b8..cbd58a3e9f 100644 --- a/crates/theme/tests/dumps/tokens/solarized-dark-dark-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/solarized-dark-dark-standard-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #073642ff surface.chrome = #073642ff surface.raised = #15414dff surface.sunken = #00252fff +surface.control = #0e4a5aff surface.knob = #e2edf1ff surface.scrim = #00000080 surface.inverse = #e2edf1ff @@ -22,6 +23,7 @@ text.on_inverse = #0c0d0eff line.divider = #00252fff line.border = #00252fff line.control_edge = #15505fff +line.outline = #657b83ff line.knob_edge = #00000000 line.frame = #0c0d0eff line.mark = #8ca4abff @@ -253,6 +255,7 @@ motion.reduced = false warning = text.normal on surface.panel: 4.11 < 4.50 warning = text.normal on surface.chrome: 4.11 < 4.50 warning = text.normal on surface.raised: 3.50 < 4.50 +warning = text.normal on surface.control: 3.10 < 4.50 warning = text.normal on state.hover: 3.10 < 4.50 warning = text.normal on state.pressed: 2.49 < 4.50 warning = text.muted on surface.background: 3.61 < 4.50 @@ -260,6 +263,7 @@ warning = text.muted on surface.panel: 2.92 < 4.50 warning = text.muted on surface.chrome: 2.92 < 4.50 warning = text.muted on surface.raised: 2.49 < 4.50 warning = text.muted on surface.sunken: 3.61 < 4.50 +warning = text.muted on surface.control: 2.20 < 4.50 warning = text.muted on state.hover: 2.20 < 4.50 warning = text.muted on state.pressed: 1.77 < 4.50 warning = text.faint on surface.background: 2.99 < 4.50 @@ -267,6 +271,7 @@ warning = text.faint on surface.panel: 2.42 < 4.50 warning = text.faint on surface.chrome: 2.42 < 4.50 warning = text.faint on surface.raised: 2.06 < 4.50 warning = text.faint on surface.sunken: 2.99 < 4.50 +warning = text.faint on surface.control: 1.82 < 4.50 warning = text.faint on state.hover: 1.82 < 4.50 warning = text.faint on state.pressed: 1.46 < 4.50 warning = status.warn.fg on surface.panel: 4.05 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/solarized-dark-dark-standard-compact.txt b/crates/theme/tests/dumps/tokens/solarized-dark-dark-standard-compact.txt index dd7f24655e..2aa846b608 100644 --- a/crates/theme/tests/dumps/tokens/solarized-dark-dark-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/solarized-dark-dark-standard-compact.txt @@ -6,6 +6,7 @@ surface.panel = #073642ff surface.chrome = #073642ff surface.raised = #15414dff surface.sunken = #00252fff +surface.control = #0e4a5aff surface.knob = #e2edf1ff surface.scrim = #00000080 surface.inverse = #e2edf1ff @@ -22,6 +23,7 @@ text.on_inverse = #0c0d0eff line.divider = #00252fff line.border = #00252fff line.control_edge = #15505fff +line.outline = #657b83ff line.knob_edge = #00000000 line.frame = #0c0d0eff line.mark = #8ca4abff @@ -253,6 +255,7 @@ motion.reduced = false warning = text.normal on surface.panel: 4.11 < 4.50 warning = text.normal on surface.chrome: 4.11 < 4.50 warning = text.normal on surface.raised: 3.50 < 4.50 +warning = text.normal on surface.control: 3.10 < 4.50 warning = text.normal on state.hover: 3.10 < 4.50 warning = text.normal on state.pressed: 2.49 < 4.50 warning = text.muted on surface.background: 3.61 < 4.50 @@ -260,6 +263,7 @@ warning = text.muted on surface.panel: 2.92 < 4.50 warning = text.muted on surface.chrome: 2.92 < 4.50 warning = text.muted on surface.raised: 2.49 < 4.50 warning = text.muted on surface.sunken: 3.61 < 4.50 +warning = text.muted on surface.control: 2.20 < 4.50 warning = text.muted on state.hover: 2.20 < 4.50 warning = text.muted on state.pressed: 1.77 < 4.50 warning = text.faint on surface.background: 2.99 < 4.50 @@ -267,6 +271,7 @@ warning = text.faint on surface.panel: 2.42 < 4.50 warning = text.faint on surface.chrome: 2.42 < 4.50 warning = text.faint on surface.raised: 2.06 < 4.50 warning = text.faint on surface.sunken: 2.99 < 4.50 +warning = text.faint on surface.control: 1.82 < 4.50 warning = text.faint on state.hover: 1.82 < 4.50 warning = text.faint on state.pressed: 1.46 < 4.50 warning = status.warn.fg on surface.panel: 4.05 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/studio-dark-high-comfortable.txt b/crates/theme/tests/dumps/tokens/studio-dark-high-comfortable.txt index 0dcd9ab91b..7c96649c4c 100644 --- a/crates/theme/tests/dumps/tokens/studio-dark-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/studio-dark-high-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #1a1a1cff surface.chrome = #141415ff surface.raised = #232325ff surface.sunken = #232326ff +surface.control = #2c2c30ff surface.knob = #ebebecff surface.scrim = #00000080 surface.inverse = #ebebecff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0dff line.divider = #26262aff line.border = #28282cff line.control_edge = #343439ff +line.outline = #c8c8d0ff line.knob_edge = #00000000 line.frame = #0d0d0dff line.mark = #a0a1a4ff diff --git a/crates/theme/tests/dumps/tokens/studio-dark-high-compact.txt b/crates/theme/tests/dumps/tokens/studio-dark-high-compact.txt index b0f1e9c7c0..aa84dca3f7 100644 --- a/crates/theme/tests/dumps/tokens/studio-dark-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/studio-dark-high-compact.txt @@ -6,6 +6,7 @@ surface.panel = #1a1a1cff surface.chrome = #141415ff surface.raised = #232325ff surface.sunken = #232326ff +surface.control = #2c2c30ff surface.knob = #ebebecff surface.scrim = #00000080 surface.inverse = #ebebecff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0dff line.divider = #26262aff line.border = #28282cff line.control_edge = #343439ff +line.outline = #c8c8d0ff line.knob_edge = #00000000 line.frame = #0d0d0dff line.mark = #a0a1a4ff diff --git a/crates/theme/tests/dumps/tokens/studio-dark-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/studio-dark-standard-comfortable.txt index 62ca1f2769..cba6ebd6b3 100644 --- a/crates/theme/tests/dumps/tokens/studio-dark-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/studio-dark-standard-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #1a1a1cff surface.chrome = #141415ff surface.raised = #232325ff surface.sunken = #232326ff +surface.control = #2c2c30ff surface.knob = #ebebecff surface.scrim = #00000080 surface.inverse = #ebebecff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0dff line.divider = #26262aff line.border = #28282cff line.control_edge = #343439ff +line.outline = #96969eff line.knob_edge = #00000000 line.frame = #0d0d0dff line.mark = #818185ff @@ -256,5 +258,6 @@ warning = text.faint on surface.panel: 2.79 < 4.50 warning = text.faint on surface.chrome: 2.95 < 4.50 warning = text.faint on surface.raised: 2.52 < 4.50 warning = text.faint on surface.sunken: 2.52 < 4.50 +warning = text.faint on surface.control: 2.23 < 4.50 warning = text.faint on state.hover: 2.23 < 4.50 warning = text.faint on state.pressed: 1.87 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/studio-dark-standard-compact.txt b/crates/theme/tests/dumps/tokens/studio-dark-standard-compact.txt index 83ce16e5ed..3f1d0c6f82 100644 --- a/crates/theme/tests/dumps/tokens/studio-dark-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/studio-dark-standard-compact.txt @@ -6,6 +6,7 @@ surface.panel = #1a1a1cff surface.chrome = #141415ff surface.raised = #232325ff surface.sunken = #232326ff +surface.control = #2c2c30ff surface.knob = #ebebecff surface.scrim = #00000080 surface.inverse = #ebebecff @@ -22,6 +23,7 @@ text.on_inverse = #0d0d0dff line.divider = #26262aff line.border = #28282cff line.control_edge = #343439ff +line.outline = #96969eff line.knob_edge = #00000000 line.frame = #0d0d0dff line.mark = #818185ff @@ -256,5 +258,6 @@ warning = text.faint on surface.panel: 2.79 < 4.50 warning = text.faint on surface.chrome: 2.95 < 4.50 warning = text.faint on surface.raised: 2.52 < 4.50 warning = text.faint on surface.sunken: 2.52 < 4.50 +warning = text.faint on surface.control: 2.23 < 4.50 warning = text.faint on state.hover: 2.23 < 4.50 warning = text.faint on state.pressed: 1.87 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/studio-light-high-comfortable.txt b/crates/theme/tests/dumps/tokens/studio-light-high-comfortable.txt index fb79624772..238bc1c669 100644 --- a/crates/theme/tests/dumps/tokens/studio-light-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/studio-light-high-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #fcfcfdff surface.chrome = #f6f6f8ff surface.raised = #ffffffff surface.sunken = #f2f2f5ff +surface.control = #e8e8edff surface.knob = #fcfcfcff surface.scrim = #00000059 surface.inverse = #262627ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfcff line.divider = #e2e2e8ff line.border = #dedee4ff line.control_edge = #d6d6dcff +line.outline = #45444eff line.knob_edge = #45444eff line.frame = #d6d6dcff line.mark = #626164ff diff --git a/crates/theme/tests/dumps/tokens/studio-light-high-compact.txt b/crates/theme/tests/dumps/tokens/studio-light-high-compact.txt index 93e56fa30d..23d08b1452 100644 --- a/crates/theme/tests/dumps/tokens/studio-light-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/studio-light-high-compact.txt @@ -6,6 +6,7 @@ surface.panel = #fcfcfdff surface.chrome = #f6f6f8ff surface.raised = #ffffffff surface.sunken = #f2f2f5ff +surface.control = #e8e8edff surface.knob = #fcfcfcff surface.scrim = #00000059 surface.inverse = #262627ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfcff line.divider = #e2e2e8ff line.border = #dedee4ff line.control_edge = #d6d6dcff +line.outline = #45444eff line.knob_edge = #45444eff line.frame = #d6d6dcff line.mark = #626164ff diff --git a/crates/theme/tests/dumps/tokens/studio-light-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/studio-light-standard-comfortable.txt index 3d5f8106b2..0a5a53a709 100644 --- a/crates/theme/tests/dumps/tokens/studio-light-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/studio-light-standard-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #fcfcfdff surface.chrome = #f6f6f8ff surface.raised = #ffffffff surface.sunken = #f2f2f5ff +surface.control = #e8e8edff surface.knob = #fcfcfcff surface.scrim = #00000059 surface.inverse = #262627ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfcff line.divider = #e2e2e8ff line.border = #dedee4ff line.control_edge = #d6d6dcff +line.outline = #60606aff line.knob_edge = #60606aff line.frame = #d6d6dcff line.mark = #7d7d80ff @@ -255,5 +257,6 @@ warning = text.faint on surface.panel: 2.86 < 4.50 warning = text.faint on surface.chrome: 2.71 < 4.50 warning = text.faint on surface.raised: 2.93 < 4.50 warning = text.faint on surface.sunken: 2.62 < 4.50 +warning = text.faint on surface.control: 2.40 < 4.50 warning = text.faint on state.hover: 2.40 < 4.50 warning = text.faint on state.pressed: 2.15 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/studio-light-standard-compact.txt b/crates/theme/tests/dumps/tokens/studio-light-standard-compact.txt index 9fccbc41a4..343cf762a0 100644 --- a/crates/theme/tests/dumps/tokens/studio-light-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/studio-light-standard-compact.txt @@ -6,6 +6,7 @@ surface.panel = #fcfcfdff surface.chrome = #f6f6f8ff surface.raised = #ffffffff surface.sunken = #f2f2f5ff +surface.control = #e8e8edff surface.knob = #fcfcfcff surface.scrim = #00000059 surface.inverse = #262627ff @@ -22,6 +23,7 @@ text.on_inverse = #fcfcfcff line.divider = #e2e2e8ff line.border = #dedee4ff line.control_edge = #d6d6dcff +line.outline = #60606aff line.knob_edge = #60606aff line.frame = #d6d6dcff line.mark = #7d7d80ff @@ -255,5 +257,6 @@ warning = text.faint on surface.panel: 2.86 < 4.50 warning = text.faint on surface.chrome: 2.71 < 4.50 warning = text.faint on surface.raised: 2.93 < 4.50 warning = text.faint on surface.sunken: 2.62 < 4.50 +warning = text.faint on surface.control: 2.40 < 4.50 warning = text.faint on state.hover: 2.40 < 4.50 warning = text.faint on state.pressed: 2.15 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-high-comfortable.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-high-comfortable.txt index 812c906cf9..05862e073e 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-high-comfortable.txt @@ -6,14 +6,15 @@ surface.panel = #181b22ff surface.chrome = #181b22ff surface.raised = #21242cff surface.sunken = #0f1116ff +surface.control = #282d37ff surface.knob = #e9ebf0ff surface.scrim = #00000080 surface.inverse = #e9ebf0ff surface.shadow = #00000096 text.normal = #dfe4ecff -text.muted = #bbc4d5ff -text.faint = #bbc4d5ff -text.disabled = #82868fff +text.muted = #c7d1e1ff +text.faint = #c7d1e2ff +text.disabled = #5a6271ff text.on_accent = #000000ff text.on_strong = #ffffffff text.on_status = #000000ff @@ -22,9 +23,10 @@ text.on_inverse = #0d0d0eff line.divider = #232832ff line.border = #06070aff line.control_edge = #2c323eff +line.outline = #4a5363ff line.knob_edge = #00000000 line.frame = #0d0d0eff -line.mark = #989da5ff +line.mark = #a3a8b0ff line.grip = #2b2e36ff line.focus = #f06a52ff accent.solid = #f26b53ff @@ -62,9 +64,9 @@ status.info.solid = #8c96a8ff status.info.solid_hover = #8f99abff status.info.solid_pressed = #a2abbdff state.hover = #262b35ff -state.pressed = #2f3541ff -state.selected = #3a2a2cff -state.selected_hover = #4d3c3eff +state.pressed = #593330ff +state.selected = #4c2e2eff +state.selected_hover = #604040ff state.disabled_fill = #181b22ff state.text_selection = #f26b5346 state.match = #f0dc005a @@ -97,14 +99,14 @@ data.cyan = #00c8ebff data.magenta = #e909a2ff data.yellow = #f0dc00ff data.scope = #282828ff -data.backdrop = #bbc4d580 +data.backdrop = #c7d1e180 data.selection = #f26b5359 caption.close_hover = #c42b1cff caption.close_pressed = #c42b1ce6 caption.close_text = #ffffffff caption.disc = #dfe4ec1a -caption.inactive = #bbc4d5ff -caption.pressed = #bbc4d5ff +caption.inactive = #c7d1e2ff +caption.pressed = #c7d1e1ff edge.light = #3d4048ff edge.dark = #000000ff shape.radius.sm = 3 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-high-compact.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-high-compact.txt index f790188e0a..4c5d9b971a 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-high-compact.txt @@ -6,14 +6,15 @@ surface.panel = #181b22ff surface.chrome = #181b22ff surface.raised = #21242cff surface.sunken = #0f1116ff +surface.control = #282d37ff surface.knob = #e9ebf0ff surface.scrim = #00000080 surface.inverse = #e9ebf0ff surface.shadow = #00000096 text.normal = #dfe4ecff -text.muted = #bbc4d5ff -text.faint = #bbc4d5ff -text.disabled = #82868fff +text.muted = #c7d1e1ff +text.faint = #c7d1e2ff +text.disabled = #5a6271ff text.on_accent = #000000ff text.on_strong = #ffffffff text.on_status = #000000ff @@ -22,9 +23,10 @@ text.on_inverse = #0d0d0eff line.divider = #232832ff line.border = #06070aff line.control_edge = #2c323eff +line.outline = #4a5363ff line.knob_edge = #00000000 line.frame = #0d0d0eff -line.mark = #989da5ff +line.mark = #a3a8b0ff line.grip = #2b2e36ff line.focus = #f06a52ff accent.solid = #f26b53ff @@ -62,9 +64,9 @@ status.info.solid = #8c96a8ff status.info.solid_hover = #8f99abff status.info.solid_pressed = #a2abbdff state.hover = #262b35ff -state.pressed = #2f3541ff -state.selected = #3a2a2cff -state.selected_hover = #4d3c3eff +state.pressed = #593330ff +state.selected = #4c2e2eff +state.selected_hover = #604040ff state.disabled_fill = #181b22ff state.text_selection = #f26b5346 state.match = #f0dc005a @@ -97,14 +99,14 @@ data.cyan = #00c8ebff data.magenta = #e909a2ff data.yellow = #f0dc00ff data.scope = #282828ff -data.backdrop = #bbc4d580 +data.backdrop = #c7d1e180 data.selection = #f26b5359 caption.close_hover = #c42b1cff caption.close_pressed = #c42b1ce6 caption.close_text = #ffffffff caption.disc = #dfe4ec1a -caption.inactive = #bbc4d5ff -caption.pressed = #bbc4d5ff +caption.inactive = #c7d1e2ff +caption.pressed = #c7d1e1ff edge.light = #3d4048ff edge.dark = #000000ff shape.radius.sm = 2 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-standard-comfortable.txt index ea748d6c02..14a5252355 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-standard-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #181b22ff surface.chrome = #181b22ff surface.raised = #21242cff surface.sunken = #0f1116ff +surface.control = #282d37ff surface.knob = #e9ebf0ff surface.scrim = #00000080 surface.inverse = #e9ebf0ff @@ -13,7 +14,7 @@ surface.shadow = #00000096 text.normal = #dfe4ecff text.muted = #969fafff text.faint = #5a6271ff -text.disabled = #82868fff +text.disabled = #5a6271ff text.on_accent = #000000ff text.on_strong = #ffffffff text.on_status = #000000ff @@ -22,9 +23,10 @@ text.on_inverse = #0d0d0eff line.divider = #232832ff line.border = #06070aff line.control_edge = #2c323eff +line.outline = #4a5363ff line.knob_edge = #00000000 line.frame = #0d0d0eff -line.mark = #797e86ff +line.mark = #83878fff line.grip = #2b2e36ff line.focus = #f06a52ff accent.solid = #f06a52ff @@ -62,9 +64,9 @@ status.info.solid = #6f788aff status.info.solid_hover = #8f99abff status.info.solid_pressed = #a2abbdff state.hover = #262b35ff -state.pressed = #2f3541ff -state.selected = #3a2a2cff -state.selected_hover = #4d3c3eff +state.pressed = #593330ff +state.selected = #4c2e2eff +state.selected_hover = #604040ff state.disabled_fill = #181b22ff state.text_selection = #f06a5246 state.match = #f0dc005a @@ -250,10 +252,12 @@ motion.caret.easing = enter motion.outline.millis = 120 motion.outline.easing = standard motion.reduced = false +warning = text.muted on state.pressed: 4.06 < 4.50 warning = text.faint on surface.background: 3.17 < 4.50 warning = text.faint on surface.panel: 2.81 < 4.50 warning = text.faint on surface.chrome: 2.81 < 4.50 warning = text.faint on surface.raised: 2.53 < 4.50 warning = text.faint on surface.sunken: 3.08 < 4.50 +warning = text.faint on surface.control: 2.25 < 4.50 warning = text.faint on state.hover: 2.31 < 4.50 -warning = text.faint on state.pressed: 2.00 < 4.50 +warning = text.faint on state.pressed: 1.76 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-standard-compact.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-standard-compact.txt index d66b2ac691..e4068c5d4e 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-dark-standard-compact.txt @@ -6,6 +6,7 @@ surface.panel = #181b22ff surface.chrome = #181b22ff surface.raised = #21242cff surface.sunken = #0f1116ff +surface.control = #282d37ff surface.knob = #e9ebf0ff surface.scrim = #00000080 surface.inverse = #e9ebf0ff @@ -13,7 +14,7 @@ surface.shadow = #00000096 text.normal = #dfe4ecff text.muted = #969fafff text.faint = #5a6271ff -text.disabled = #82868fff +text.disabled = #5a6271ff text.on_accent = #000000ff text.on_strong = #ffffffff text.on_status = #000000ff @@ -22,9 +23,10 @@ text.on_inverse = #0d0d0eff line.divider = #232832ff line.border = #06070aff line.control_edge = #2c323eff +line.outline = #4a5363ff line.knob_edge = #00000000 line.frame = #0d0d0eff -line.mark = #797e86ff +line.mark = #83878fff line.grip = #2b2e36ff line.focus = #f06a52ff accent.solid = #f06a52ff @@ -62,9 +64,9 @@ status.info.solid = #6f788aff status.info.solid_hover = #8f99abff status.info.solid_pressed = #a2abbdff state.hover = #262b35ff -state.pressed = #2f3541ff -state.selected = #3a2a2cff -state.selected_hover = #4d3c3eff +state.pressed = #593330ff +state.selected = #4c2e2eff +state.selected_hover = #604040ff state.disabled_fill = #181b22ff state.text_selection = #f06a5246 state.match = #f0dc005a @@ -250,10 +252,12 @@ motion.caret.easing = enter motion.outline.millis = 120 motion.outline.easing = standard motion.reduced = false +warning = text.muted on state.pressed: 4.06 < 4.50 warning = text.faint on surface.background: 3.17 < 4.50 warning = text.faint on surface.panel: 2.81 < 4.50 warning = text.faint on surface.chrome: 2.81 < 4.50 warning = text.faint on surface.raised: 2.53 < 4.50 warning = text.faint on surface.sunken: 3.08 < 4.50 +warning = text.faint on surface.control: 2.25 < 4.50 warning = text.faint on state.hover: 2.31 < 4.50 -warning = text.faint on state.pressed: 2.00 < 4.50 +warning = text.faint on state.pressed: 1.76 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-high-comfortable.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-high-comfortable.txt index 4b820d4ad7..d7384b50f6 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-high-comfortable.txt @@ -6,14 +6,15 @@ surface.panel = #f3f5f8ff surface.chrome = #f3f5f8ff surface.raised = #f9fbfeff surface.sunken = #ffffffff +surface.control = #e3e7edff surface.knob = #fcfcfdff surface.scrim = #00000059 surface.inverse = #262627ff surface.shadow = #00000032 text.normal = #1b1f27ff -text.muted = #3d4452ff -text.faint = #3f444fff -text.disabled = #848689ff +text.muted = #383f4dff +text.faint = #3a3f4aff +text.disabled = #9aa1adff text.on_accent = #ffffffff text.on_strong = #ffffffff text.on_status = #000000ff @@ -22,9 +23,10 @@ text.on_inverse = #fcfcfdff line.divider = #dde1e8ff line.border = #d0d5ddff line.control_edge = #c3c9d3ff -line.knob_edge = #3d4452ff +line.outline = #a4abb8ff +line.knob_edge = #383f4dff line.frame = #c3c9d3ff -line.mark = #5f6062ff +line.mark = #5a5b5dff line.grip = #e2e4e7ff line.focus = #c4321aff accent.solid = #af1c00ff @@ -62,9 +64,9 @@ status.info.solid = #8c96a8ff status.info.solid_hover = #8c96a8ff status.info.solid_pressed = #8d96a7ff state.hover = #e3e7edff -state.pressed = #d5dbe3ff -state.selected = #f8d9d2ff -state.selected_hover = #eccec7ff +state.pressed = #edcbc8ff +state.selected = #eed2d0ff +state.selected_hover = #e2c7c5ff state.disabled_fill = #f3f5f8ff state.text_selection = #af1c0046 state.match = #8378005a @@ -97,14 +99,14 @@ data.cyan = #00829aff data.magenta = #e0009cff data.yellow = #837800ff data.scope = #282828ff -data.backdrop = #3d445280 +data.backdrop = #383f4d80 data.selection = #af1c0059 caption.close_hover = #c42b1cff caption.close_pressed = #c42b1ce6 caption.close_text = #ffffffff caption.disc = #1b1f271a -caption.inactive = #3f444fff -caption.pressed = #3d4452ff +caption.inactive = #3a3f4aff +caption.pressed = #383f4dff edge.light = #ffffffff edge.dark = #a0a1a4ff shape.radius.sm = 3 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-high-compact.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-high-compact.txt index 38b4a70b01..ae25fc6242 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-high-compact.txt @@ -6,14 +6,15 @@ surface.panel = #f3f5f8ff surface.chrome = #f3f5f8ff surface.raised = #f9fbfeff surface.sunken = #ffffffff +surface.control = #e3e7edff surface.knob = #fcfcfdff surface.scrim = #00000059 surface.inverse = #262627ff surface.shadow = #00000032 text.normal = #1b1f27ff -text.muted = #3d4452ff -text.faint = #3f444fff -text.disabled = #848689ff +text.muted = #383f4dff +text.faint = #3a3f4aff +text.disabled = #9aa1adff text.on_accent = #ffffffff text.on_strong = #ffffffff text.on_status = #000000ff @@ -22,9 +23,10 @@ text.on_inverse = #fcfcfdff line.divider = #dde1e8ff line.border = #d0d5ddff line.control_edge = #c3c9d3ff -line.knob_edge = #3d4452ff +line.outline = #a4abb8ff +line.knob_edge = #383f4dff line.frame = #c3c9d3ff -line.mark = #5f6062ff +line.mark = #5a5b5dff line.grip = #e2e4e7ff line.focus = #c4321aff accent.solid = #af1c00ff @@ -62,9 +64,9 @@ status.info.solid = #8c96a8ff status.info.solid_hover = #8c96a8ff status.info.solid_pressed = #8d96a7ff state.hover = #e3e7edff -state.pressed = #d5dbe3ff -state.selected = #f8d9d2ff -state.selected_hover = #eccec7ff +state.pressed = #edcbc8ff +state.selected = #eed2d0ff +state.selected_hover = #e2c7c5ff state.disabled_fill = #f3f5f8ff state.text_selection = #af1c0046 state.match = #8378005a @@ -97,14 +99,14 @@ data.cyan = #00829aff data.magenta = #e0009cff data.yellow = #837800ff data.scope = #282828ff -data.backdrop = #3d445280 +data.backdrop = #383f4d80 data.selection = #af1c0059 caption.close_hover = #c42b1cff caption.close_pressed = #c42b1ce6 caption.close_text = #ffffffff caption.disc = #1b1f271a -caption.inactive = #3f444fff -caption.pressed = #3d4452ff +caption.inactive = #3a3f4aff +caption.pressed = #383f4dff edge.light = #ffffffff edge.dark = #a0a1a4ff shape.radius.sm = 2 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-standard-comfortable.txt index 5fac7f9458..f610585cb7 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-standard-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #f3f5f8ff surface.chrome = #f3f5f8ff surface.raised = #f9fbfeff surface.sunken = #ffffffff +surface.control = #e3e7edff surface.knob = #fcfcfdff surface.scrim = #00000059 surface.inverse = #262627ff @@ -13,7 +14,7 @@ surface.shadow = #00000032 text.normal = #1b1f27ff text.muted = #58606eff text.faint = #9aa1adff -text.disabled = #848689ff +text.disabled = #9aa1adff text.on_accent = #000000ff text.on_strong = #ffffffff text.on_status = #000000ff @@ -22,9 +23,10 @@ text.on_inverse = #fcfcfdff line.divider = #dde1e8ff line.border = #d0d5ddff line.control_edge = #c3c9d3ff +line.outline = #a4abb8ff line.knob_edge = #58606eff line.frame = #c3c9d3ff -line.mark = #7a7c7eff +line.mark = #757678ff line.grip = #e2e4e7ff line.focus = #d9472fff accent.solid = #d9472fff @@ -62,9 +64,9 @@ status.info.solid = #6f788aff status.info.solid_hover = #6c7587ff status.info.solid_pressed = #6c7585ff state.hover = #e3e7edff -state.pressed = #d5dbe3ff -state.selected = #f8d9d2ff -state.selected_hover = #eccec7ff +state.pressed = #edcbc8ff +state.selected = #eed2d0ff +state.selected_hover = #e2c7c5ff state.disabled_fill = #f3f5f8ff state.text_selection = #d9472f46 state.match = #f0dc005a @@ -250,10 +252,12 @@ motion.caret.easing = enter motion.outline.millis = 120 motion.outline.easing = standard motion.reduced = false +warning = text.muted on state.pressed: 4.22 < 4.50 warning = text.faint on surface.background: 2.14 < 4.50 warning = text.faint on surface.panel: 2.38 < 4.50 warning = text.faint on surface.chrome: 2.38 < 4.50 warning = text.faint on surface.raised: 2.51 < 4.50 warning = text.faint on surface.sunken: 2.60 < 4.50 +warning = text.faint on surface.control: 2.10 < 4.50 warning = text.faint on state.hover: 2.10 < 4.50 -warning = text.faint on state.pressed: 1.87 < 4.50 +warning = text.faint on state.pressed: 1.73 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-standard-compact.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-standard-compact.txt index 2958fed494..aeeae13fd3 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-light-standard-compact.txt @@ -6,6 +6,7 @@ surface.panel = #f3f5f8ff surface.chrome = #f3f5f8ff surface.raised = #f9fbfeff surface.sunken = #ffffffff +surface.control = #e3e7edff surface.knob = #fcfcfdff surface.scrim = #00000059 surface.inverse = #262627ff @@ -13,7 +14,7 @@ surface.shadow = #00000032 text.normal = #1b1f27ff text.muted = #58606eff text.faint = #9aa1adff -text.disabled = #848689ff +text.disabled = #9aa1adff text.on_accent = #000000ff text.on_strong = #ffffffff text.on_status = #000000ff @@ -22,9 +23,10 @@ text.on_inverse = #fcfcfdff line.divider = #dde1e8ff line.border = #d0d5ddff line.control_edge = #c3c9d3ff +line.outline = #a4abb8ff line.knob_edge = #58606eff line.frame = #c3c9d3ff -line.mark = #7a7c7eff +line.mark = #757678ff line.grip = #e2e4e7ff line.focus = #d9472fff accent.solid = #d9472fff @@ -62,9 +64,9 @@ status.info.solid = #6f788aff status.info.solid_hover = #6c7587ff status.info.solid_pressed = #6c7585ff state.hover = #e3e7edff -state.pressed = #d5dbe3ff -state.selected = #f8d9d2ff -state.selected_hover = #eccec7ff +state.pressed = #edcbc8ff +state.selected = #eed2d0ff +state.selected_hover = #e2c7c5ff state.disabled_fill = #f3f5f8ff state.text_selection = #d9472f46 state.match = #f0dc005a @@ -250,10 +252,12 @@ motion.caret.easing = enter motion.outline.millis = 120 motion.outline.easing = standard motion.reduced = false +warning = text.muted on state.pressed: 4.22 < 4.50 warning = text.faint on surface.background: 2.14 < 4.50 warning = text.faint on surface.panel: 2.38 < 4.50 warning = text.faint on surface.chrome: 2.38 < 4.50 warning = text.faint on surface.raised: 2.51 < 4.50 warning = text.faint on surface.sunken: 2.60 < 4.50 +warning = text.faint on surface.control: 2.10 < 4.50 warning = text.faint on state.hover: 2.10 < 4.50 -warning = text.faint on state.pressed: 1.87 < 4.50 +warning = text.faint on state.pressed: 1.73 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-high-comfortable.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-high-comfortable.txt index f38597b671..97a4824005 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-high-comfortable.txt @@ -6,25 +6,27 @@ surface.panel = #272c36ff surface.chrome = #272c36ff surface.raised = #313640ff surface.sunken = #1a1e26ff +surface.control = #39404dff surface.knob = #e8ebf1ff surface.scrim = #00000080 surface.inverse = #e8ebf1ff surface.shadow = #00000096 text.normal = #e4e9f1ff -text.muted = #d3dcedff -text.faint = #d2ddeeff -text.disabled = #808692ff +text.muted = #d9e3f4ff +text.faint = #d8e3f4ff +text.disabled = #626b7aff text.on_accent = #000000ff text.on_strong = #ffffffff text.on_status = #000000ff -text.on_selected = #e8ebf1ff +text.on_selected = #f5f9ffff text.on_inverse = #0d0d0eff line.divider = #323946ff line.border = #11141aff line.control_edge = #3a414eff +line.outline = #5a6476ff line.knob_edge = #00000000 line.frame = #0d0d0eff -line.mark = #abb2beff +line.mark = #b0b7c3ff line.grip = #3b404bff line.focus = #fc755cff accent.solid = #fc755cff @@ -62,9 +64,9 @@ status.info.solid = #8c96a8ff status.info.solid_hover = #8f99abff status.info.solid_pressed = #a2abbdff state.hover = #353c49ff -state.pressed = #3d4553ff -state.selected = #4a3236ff -state.selected_hover = #5e4448ff +state.pressed = #633f3eff +state.selected = #573b3dff +state.selected_hover = #6b4e50ff state.disabled_fill = #272c36ff state.text_selection = #fc755c46 state.match = #f0dc005a @@ -97,14 +99,14 @@ data.cyan = #00c8ebff data.magenta = #f423abff data.yellow = #f0dc00ff data.scope = #282828ff -data.backdrop = #d3dced80 +data.backdrop = #d9e3f480 data.selection = #fc755c59 caption.close_hover = #c42b1cff caption.close_pressed = #c42b1ce6 caption.close_text = #ffffffff caption.disc = #e4e9f11a -caption.inactive = #d2ddeeff -caption.pressed = #d3dcedff +caption.inactive = #d8e3f4ff +caption.pressed = #d9e3f4ff edge.light = #4e535eff edge.dark = #000001ff shape.radius.sm = 3 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-high-compact.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-high-compact.txt index 272a5add33..c8561174b8 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-high-compact.txt @@ -6,25 +6,27 @@ surface.panel = #272c36ff surface.chrome = #272c36ff surface.raised = #313640ff surface.sunken = #1a1e26ff +surface.control = #39404dff surface.knob = #e8ebf1ff surface.scrim = #00000080 surface.inverse = #e8ebf1ff surface.shadow = #00000096 text.normal = #e4e9f1ff -text.muted = #d3dcedff -text.faint = #d2ddeeff -text.disabled = #808692ff +text.muted = #d9e3f4ff +text.faint = #d8e3f4ff +text.disabled = #626b7aff text.on_accent = #000000ff text.on_strong = #ffffffff text.on_status = #000000ff -text.on_selected = #e8ebf1ff +text.on_selected = #f5f9ffff text.on_inverse = #0d0d0eff line.divider = #323946ff line.border = #11141aff line.control_edge = #3a414eff +line.outline = #5a6476ff line.knob_edge = #00000000 line.frame = #0d0d0eff -line.mark = #abb2beff +line.mark = #b0b7c3ff line.grip = #3b404bff line.focus = #fc755cff accent.solid = #fc755cff @@ -62,9 +64,9 @@ status.info.solid = #8c96a8ff status.info.solid_hover = #8f99abff status.info.solid_pressed = #a2abbdff state.hover = #353c49ff -state.pressed = #3d4553ff -state.selected = #4a3236ff -state.selected_hover = #5e4448ff +state.pressed = #633f3eff +state.selected = #573b3dff +state.selected_hover = #6b4e50ff state.disabled_fill = #272c36ff state.text_selection = #fc755c46 state.match = #f0dc005a @@ -97,14 +99,14 @@ data.cyan = #00c8ebff data.magenta = #f423abff data.yellow = #f0dc00ff data.scope = #282828ff -data.backdrop = #d3dced80 +data.backdrop = #d9e3f480 data.selection = #fc755c59 caption.close_hover = #c42b1cff caption.close_pressed = #c42b1ce6 caption.close_text = #ffffffff caption.disc = #e4e9f11a -caption.inactive = #d2ddeeff -caption.pressed = #d3dcedff +caption.inactive = #d8e3f4ff +caption.pressed = #d9e3f4ff edge.light = #4e535eff edge.dark = #000001ff shape.radius.sm = 2 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-standard-comfortable.txt index 1280892e8c..e84b9e3e75 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-standard-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #272c36ff surface.chrome = #272c36ff surface.raised = #313640ff surface.sunken = #1a1e26ff +surface.control = #39404dff surface.knob = #e8ebf1ff surface.scrim = #00000080 surface.inverse = #e8ebf1ff @@ -13,7 +14,7 @@ surface.shadow = #00000096 text.normal = #e4e9f1ff text.muted = #99a2b2ff text.faint = #626b7aff -text.disabled = #808692ff +text.disabled = #626b7aff text.on_accent = #000000ff text.on_strong = #ffffffff text.on_status = #000000ff @@ -22,9 +23,10 @@ text.on_inverse = #0d0d0eff line.divider = #323946ff line.border = #11141aff line.control_edge = #3a414eff +line.outline = #5a6476ff line.knob_edge = #00000000 line.frame = #0d0d0eff -line.mark = #89909bff +line.mark = #8e95a0ff line.grip = #3b404bff line.focus = #f06a52ff accent.solid = #f06a52ff @@ -62,9 +64,9 @@ status.info.solid = #6f788aff status.info.solid_hover = #8f99abff status.info.solid_pressed = #a2abbdff state.hover = #353c49ff -state.pressed = #3d4553ff -state.selected = #4a3236ff -state.selected_hover = #5e4448ff +state.pressed = #633f3eff +state.selected = #573b3dff +state.selected_hover = #6b4e50ff state.disabled_fill = #272c36ff state.text_selection = #f06a5246 state.match = #f0dc005a @@ -250,12 +252,14 @@ motion.caret.easing = enter motion.outline.millis = 120 motion.outline.easing = standard motion.reduced = false +warning = text.muted on surface.control: 4.05 < 4.50 warning = text.muted on state.hover: 4.31 < 4.50 -warning = text.muted on state.pressed: 3.75 < 4.50 +warning = text.muted on state.pressed: 3.53 < 4.50 warning = text.faint on surface.background: 3.07 < 4.50 warning = text.faint on surface.panel: 2.60 < 4.50 warning = text.faint on surface.chrome: 2.60 < 4.50 warning = text.faint on surface.raised: 2.25 < 4.50 warning = text.faint on surface.sunken: 3.10 < 4.50 +warning = text.faint on surface.control: 1.94 < 4.50 warning = text.faint on state.hover: 2.06 < 4.50 -warning = text.faint on state.pressed: 1.80 < 4.50 +warning = text.faint on state.pressed: 1.69 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-standard-compact.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-standard-compact.txt index da092c68e6..841009d9c7 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-dark-standard-compact.txt @@ -6,6 +6,7 @@ surface.panel = #272c36ff surface.chrome = #272c36ff surface.raised = #313640ff surface.sunken = #1a1e26ff +surface.control = #39404dff surface.knob = #e8ebf1ff surface.scrim = #00000080 surface.inverse = #e8ebf1ff @@ -13,7 +14,7 @@ surface.shadow = #00000096 text.normal = #e4e9f1ff text.muted = #99a2b2ff text.faint = #626b7aff -text.disabled = #808692ff +text.disabled = #626b7aff text.on_accent = #000000ff text.on_strong = #ffffffff text.on_status = #000000ff @@ -22,9 +23,10 @@ text.on_inverse = #0d0d0eff line.divider = #323946ff line.border = #11141aff line.control_edge = #3a414eff +line.outline = #5a6476ff line.knob_edge = #00000000 line.frame = #0d0d0eff -line.mark = #89909bff +line.mark = #8e95a0ff line.grip = #3b404bff line.focus = #f06a52ff accent.solid = #f06a52ff @@ -62,9 +64,9 @@ status.info.solid = #6f788aff status.info.solid_hover = #8f99abff status.info.solid_pressed = #a2abbdff state.hover = #353c49ff -state.pressed = #3d4553ff -state.selected = #4a3236ff -state.selected_hover = #5e4448ff +state.pressed = #633f3eff +state.selected = #573b3dff +state.selected_hover = #6b4e50ff state.disabled_fill = #272c36ff state.text_selection = #f06a5246 state.match = #f0dc005a @@ -250,12 +252,14 @@ motion.caret.easing = enter motion.outline.millis = 120 motion.outline.easing = standard motion.reduced = false +warning = text.muted on surface.control: 4.05 < 4.50 warning = text.muted on state.hover: 4.31 < 4.50 -warning = text.muted on state.pressed: 3.75 < 4.50 +warning = text.muted on state.pressed: 3.53 < 4.50 warning = text.faint on surface.background: 3.07 < 4.50 warning = text.faint on surface.panel: 2.60 < 4.50 warning = text.faint on surface.chrome: 2.60 < 4.50 warning = text.faint on surface.raised: 2.25 < 4.50 warning = text.faint on surface.sunken: 3.10 < 4.50 +warning = text.faint on surface.control: 1.94 < 4.50 warning = text.faint on state.hover: 2.06 < 4.50 -warning = text.faint on state.pressed: 1.80 < 4.50 +warning = text.faint on state.pressed: 1.69 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-high-comfortable.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-high-comfortable.txt index 647ee21631..c520b18b0a 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-high-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-high-comfortable.txt @@ -6,14 +6,15 @@ surface.panel = #d3d8e0ff surface.chrome = #d3d8e0ff surface.raised = #d9dee6ff surface.sunken = #e9ecf1ff +surface.control = #c9d0daff surface.knob = #fcfcfdff surface.scrim = #00000059 surface.inverse = #252629ff surface.shadow = #00000032 text.normal = #1b1f27ff -text.muted = #2a303eff -text.faint = #2a303dff -text.disabled = #82868eff +text.muted = #292f3dff +text.faint = #29303cff +text.disabled = #7d8594ff text.on_accent = #ffffffff text.on_strong = #ffffffff text.on_status = #000000ff @@ -22,9 +23,10 @@ text.on_inverse = #fcfcfdff line.divider = #bcc3ceff line.border = #a9b0bcff line.control_edge = #9aa2b0ff -line.knob_edge = #2a303eff +line.outline = #8a93a2ff +line.knob_edge = #292f3dff line.frame = #9aa2b0ff -line.mark = #4a4d54ff +line.mark = #494c53ff line.grip = #c3c8d0ff line.focus = #a81a00ff accent.solid = #af1b00ff @@ -62,9 +64,9 @@ status.info.solid = #8c96a8ff status.info.solid_hover = #8c96a8ff status.info.solid_pressed = #8d96a7ff state.hover = #c5ccd6ff -state.pressed = #b6bec9ff -state.selected = #e7c4bdff -state.selected_hover = #dbb9b2ff +state.pressed = #d4b5b6ff +state.selected = #d4bbbdff +state.selected_hover = #c9b0b2ff state.disabled_fill = #d3d8e0ff state.text_selection = #af1b0046 state.match = #776c005a @@ -97,14 +99,14 @@ data.cyan = #00758bff data.magenta = #cb008dff data.yellow = #776c00ff data.scope = #282828ff -data.backdrop = #2a303e80 +data.backdrop = #292f3d80 data.selection = #af1b0059 caption.close_hover = #c42b1cff caption.close_pressed = #c42b1ce6 caption.close_text = #ffffffff caption.disc = #1b1f271a -caption.inactive = #2a303dff -caption.pressed = #2a303eff +caption.inactive = #29303cff +caption.pressed = #292f3dff edge.light = #ffffffff edge.dark = #82878eff shape.radius.sm = 3 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-high-compact.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-high-compact.txt index df1623ec60..38de13e382 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-high-compact.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-high-compact.txt @@ -6,14 +6,15 @@ surface.panel = #d3d8e0ff surface.chrome = #d3d8e0ff surface.raised = #d9dee6ff surface.sunken = #e9ecf1ff +surface.control = #c9d0daff surface.knob = #fcfcfdff surface.scrim = #00000059 surface.inverse = #252629ff surface.shadow = #00000032 text.normal = #1b1f27ff -text.muted = #2a303eff -text.faint = #2a303dff -text.disabled = #82868eff +text.muted = #292f3dff +text.faint = #29303cff +text.disabled = #7d8594ff text.on_accent = #ffffffff text.on_strong = #ffffffff text.on_status = #000000ff @@ -22,9 +23,10 @@ text.on_inverse = #fcfcfdff line.divider = #bcc3ceff line.border = #a9b0bcff line.control_edge = #9aa2b0ff -line.knob_edge = #2a303eff +line.outline = #8a93a2ff +line.knob_edge = #292f3dff line.frame = #9aa2b0ff -line.mark = #4a4d54ff +line.mark = #494c53ff line.grip = #c3c8d0ff line.focus = #a81a00ff accent.solid = #af1b00ff @@ -62,9 +64,9 @@ status.info.solid = #8c96a8ff status.info.solid_hover = #8c96a8ff status.info.solid_pressed = #8d96a7ff state.hover = #c5ccd6ff -state.pressed = #b6bec9ff -state.selected = #e7c4bdff -state.selected_hover = #dbb9b2ff +state.pressed = #d4b5b6ff +state.selected = #d4bbbdff +state.selected_hover = #c9b0b2ff state.disabled_fill = #d3d8e0ff state.text_selection = #af1b0046 state.match = #776c005a @@ -97,14 +99,14 @@ data.cyan = #00758bff data.magenta = #cb008dff data.yellow = #776c00ff data.scope = #282828ff -data.backdrop = #2a303e80 +data.backdrop = #292f3d80 data.selection = #af1b0059 caption.close_hover = #c42b1cff caption.close_pressed = #c42b1ce6 caption.close_text = #ffffffff caption.disc = #1b1f271a -caption.inactive = #2a303dff -caption.pressed = #2a303eff +caption.inactive = #29303cff +caption.pressed = #292f3dff edge.light = #ffffffff edge.dark = #82878eff shape.radius.sm = 2 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-standard-comfortable.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-standard-comfortable.txt index 5ad36953a3..bfeee3a203 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-standard-comfortable.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-standard-comfortable.txt @@ -6,6 +6,7 @@ surface.panel = #d3d8e0ff surface.chrome = #d3d8e0ff surface.raised = #d9dee6ff surface.sunken = #e9ecf1ff +surface.control = #c9d0daff surface.knob = #fcfcfdff surface.scrim = #00000059 surface.inverse = #252629ff @@ -13,7 +14,7 @@ surface.shadow = #00000032 text.normal = #1b1f27ff text.muted = #4a5160ff text.faint = #7d8594ff -text.disabled = #82868eff +text.disabled = #7d8594ff text.on_accent = #000000ff text.on_strong = #ffffffff text.on_status = #000000ff @@ -22,9 +23,10 @@ text.on_inverse = #fcfcfdff line.divider = #bcc3ceff line.border = #a9b0bcff line.control_edge = #9aa2b0ff +line.outline = #8a93a2ff line.knob_edge = #4a5160ff line.frame = #9aa2b0ff -line.mark = #64676eff +line.mark = #63676dff line.grip = #c3c8d0ff line.focus = #cd3b24ff accent.solid = #d9472fff @@ -62,9 +64,9 @@ status.info.solid = #6f788aff status.info.solid_hover = #6c7587ff status.info.solid_pressed = #6c7585ff state.hover = #c5ccd6ff -state.pressed = #b6bec9ff -state.selected = #e7c4bdff -state.selected_hover = #dbb9b2ff +state.pressed = #d4b5b6ff +state.selected = #d4bbbdff +state.selected_hover = #c9b0b2ff state.disabled_fill = #d3d8e0ff state.text_selection = #d9472f46 state.match = #f0dc005a @@ -251,11 +253,12 @@ motion.outline.millis = 120 motion.outline.easing = standard motion.reduced = false warning = accent.solid on surface.panel: 3.00 < 3.00 -warning = text.muted on state.pressed: 4.25 < 4.50 +warning = text.muted on state.pressed: 4.20 < 4.50 warning = text.faint on surface.background: 2.25 < 4.50 warning = text.faint on surface.panel: 2.59 < 4.50 warning = text.faint on surface.chrome: 2.59 < 4.50 warning = text.faint on surface.raised: 2.75 < 4.50 warning = text.faint on surface.sunken: 3.14 < 4.50 +warning = text.faint on surface.control: 2.39 < 4.50 warning = text.faint on state.hover: 2.30 < 4.50 -warning = text.faint on state.pressed: 1.98 < 4.50 +warning = text.faint on state.pressed: 1.96 < 4.50 diff --git a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-standard-compact.txt b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-standard-compact.txt index 5107c75c78..3cdc856659 100644 --- a/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-standard-compact.txt +++ b/crates/theme/tests/dumps/tokens/vectorcraft-modern-medium-light-standard-compact.txt @@ -6,6 +6,7 @@ surface.panel = #d3d8e0ff surface.chrome = #d3d8e0ff surface.raised = #d9dee6ff surface.sunken = #e9ecf1ff +surface.control = #c9d0daff surface.knob = #fcfcfdff surface.scrim = #00000059 surface.inverse = #252629ff @@ -13,7 +14,7 @@ surface.shadow = #00000032 text.normal = #1b1f27ff text.muted = #4a5160ff text.faint = #7d8594ff -text.disabled = #82868eff +text.disabled = #7d8594ff text.on_accent = #000000ff text.on_strong = #ffffffff text.on_status = #000000ff @@ -22,9 +23,10 @@ text.on_inverse = #fcfcfdff line.divider = #bcc3ceff line.border = #a9b0bcff line.control_edge = #9aa2b0ff +line.outline = #8a93a2ff line.knob_edge = #4a5160ff line.frame = #9aa2b0ff -line.mark = #64676eff +line.mark = #63676dff line.grip = #c3c8d0ff line.focus = #cd3b24ff accent.solid = #d9472fff @@ -62,9 +64,9 @@ status.info.solid = #6f788aff status.info.solid_hover = #6c7587ff status.info.solid_pressed = #6c7585ff state.hover = #c5ccd6ff -state.pressed = #b6bec9ff -state.selected = #e7c4bdff -state.selected_hover = #dbb9b2ff +state.pressed = #d4b5b6ff +state.selected = #d4bbbdff +state.selected_hover = #c9b0b2ff state.disabled_fill = #d3d8e0ff state.text_selection = #d9472f46 state.match = #f0dc005a @@ -251,11 +253,12 @@ motion.outline.millis = 120 motion.outline.easing = standard motion.reduced = false warning = accent.solid on surface.panel: 3.00 < 3.00 -warning = text.muted on state.pressed: 4.25 < 4.50 +warning = text.muted on state.pressed: 4.20 < 4.50 warning = text.faint on surface.background: 2.25 < 4.50 warning = text.faint on surface.panel: 2.59 < 4.50 warning = text.faint on surface.chrome: 2.59 < 4.50 warning = text.faint on surface.raised: 2.75 < 4.50 warning = text.faint on surface.sunken: 3.14 < 4.50 +warning = text.faint on surface.control: 2.39 < 4.50 warning = text.faint on state.hover: 2.30 < 4.50 -warning = text.faint on state.pressed: 1.98 < 4.50 +warning = text.faint on state.pressed: 1.96 < 4.50 diff --git a/crates/theme/themes/vectorcraft-modern-medium.json b/crates/theme/themes/vectorcraft-modern-medium.json index 7c416f16e2..bc43e6148d 100644 --- a/crates/theme/themes/vectorcraft-modern-medium.json +++ b/crates/theme/themes/vectorcraft-modern-medium.json @@ -24,17 +24,20 @@ "line.border": "#a9b0bc", "line.control_edge": "#9aa2b0", "line.divider": "#bcc3ce", + "line.outline": "#8a93a2", "seeds": { "accent": "#d9472f", "neutral": "#d3d8e0" }, "state.hover": "#c5ccd6", - "state.pressed": "#b6bec9", - "state.selected": "#e7c4bd", + "state.pressed": "#d4b5b6", + "state.selected": "#d4bbbd", "surface.background": "#c4cad4", "surface.canvas": "#b9c0cb", + "surface.control": "#c9d0da", "surface.panel": "#d3d8e0", "surface.sunken": "#e9ecf1", + "text.disabled": "#7d8594", "text.faint": "#7d8594", "text.muted": "#4a5160", "text.normal": "#1b1f27" @@ -46,13 +49,16 @@ "line.border": "#11141a", "line.control_edge": "#3a414e", "line.divider": "#323946", + "line.outline": "#5a6476", "state.hover": "#353c49", - "state.pressed": "#3d4553", - "state.selected": "#4a3236", + "state.pressed": "#633f3e", + "state.selected": "#573b3d", "surface.background": "#1b1f27", "surface.canvas": "#1e222a", + "surface.control": "#39404d", "surface.panel": "#272c36", "surface.sunken": "#1a1e26", + "text.disabled": "#626b7a", "text.faint": "#626b7a", "text.muted": "#99a2b2", "text.normal": "#e4e9f1" diff --git a/crates/theme/themes/vectorcraft-modern.json b/crates/theme/themes/vectorcraft-modern.json index be251b3e4e..27424c4737 100644 --- a/crates/theme/themes/vectorcraft-modern.json +++ b/crates/theme/themes/vectorcraft-modern.json @@ -24,17 +24,20 @@ "line.border": "#d0d5dd", "line.control_edge": "#c3c9d3", "line.divider": "#dde1e8", + "line.outline": "#a4abb8", "seeds": { "accent": "#d9472f", "neutral": "#f3f5f8" }, "state.hover": "#e3e7ed", - "state.pressed": "#d5dbe3", - "state.selected": "#f8d9d2", + "state.pressed": "#edcbc8", + "state.selected": "#eed2d0", "surface.background": "#e6e9ee", "surface.canvas": "#dfe3e9", + "surface.control": "#e3e7ed", "surface.panel": "#f3f5f8", "surface.sunken": "#ffffff", + "text.disabled": "#9aa1ad", "text.faint": "#9aa1ad", "text.muted": "#58606e", "text.normal": "#1b1f27" @@ -46,13 +49,16 @@ "line.border": "#06070a", "line.control_edge": "#2c323e", "line.divider": "#232832", + "line.outline": "#4a5363", "state.hover": "#262b35", - "state.pressed": "#2f3541", - "state.selected": "#3a2a2c", + "state.pressed": "#593330", + "state.selected": "#4c2e2e", "surface.background": "#0b0d12", "surface.canvas": "#101217", + "surface.control": "#282d37", "surface.panel": "#181b22", "surface.sunken": "#0f1116", + "text.disabled": "#5a6271", "text.faint": "#5a6271", "text.muted": "#969faf", "text.normal": "#dfe4ec" diff --git a/crates/ui-canvas/tests/it/canvas/navigate.rs b/crates/ui-canvas/tests/it/canvas/navigate.rs index 87694e16fb..bcb8801f46 100644 --- a/crates/ui-canvas/tests/it/canvas/navigate.rs +++ b/crates/ui-canvas/tests/it/canvas/navigate.rs @@ -152,6 +152,42 @@ fn cmd_or_ctrl_with_page_down_scrolls_a_focused_canvas_sideways_on_every_os() { } } +const NEXT_ARTBOARD: &str = "canvasTrial.nextArtboard"; + +/// A page key the app binds to a command runs it ahead of the canvas's page scroll, with nothing focused and with the +/// canvas focused (Page Down goes to the next artboard); an unbound page key still scrolls the view. +#[trial] +fn a_bound_page_key_runs_its_command_and_an_unbound_one_pages_the_canvas() { + let view = Rc::new(Cell::new(CanvasView::new(egui::Rect::ZERO, Point::new(2000.0, 2000.0), 1.0))); + let shown = Rc::clone(&view); + let mut fixture = Fixture::new(move |ui| { + let mut given = shown.get(); + given.rect = ui.available_rect_before_wrap(); + let canvas = Canvas::new("Document").document(Size::new(4000.0, 4000.0)).view(given).show(ui, |_, _| {}); + shown.set(canvas.output.view.unwrap_or(given)); + }); + let binding = Binding::parse("PageDown").expect("the trial's chord parses"); + let catalog = + AppCatalog::new(vec![CommandDef::new(NEXT_ARTBOARD, "Next Artboard", Scope::app()).with_default(binding)], 1).expect("the catalog is valid"); + fixture.commands(CommandInput::new().catalog(catalog)); + fixture.settle(); + let page = |fixture: &mut Fixture, key: Key| { + frame::take_output(fixture.ctx()); + let before = view.get().center; + fixture.key(key, Modifiers::NONE).settle(); + let fired: Vec = frame::take_output(fixture.ctx()).fired.into_iter().map(|fired| fired.command.id).collect(); + (fired, view.get().center != before) + }; + assert_eq!(fixture.focused(), None, "nothing is focused"); + assert_eq!(page(&mut fixture, Key::PageDown), (vec![NEXT_ARTBOARD.to_owned()], false), "unfocused: the bound Page Down runs its command"); + assert_eq!(page(&mut fixture, Key::PageUp), (Vec::new(), true), "unfocused: the unbound Page Up scrolls"); + let canvas = fixture.by_role(Role::CANVAS)[0]; + fixture.click(&canvas); + assert!(fixture.focused().is_some(), "the click focuses the canvas"); + assert_eq!(page(&mut fixture, Key::PageDown), (vec![NEXT_ARTBOARD.to_owned()], false), "focused: the bound Page Down runs its command"); + assert_eq!(page(&mut fixture, Key::PageUp), (Vec::new(), true), "focused: the unbound Page Up scrolls"); +} + #[trial] fn cmd_or_ctrl_with_page_down_on_a_focused_canvas_control_scrolls_the_canvas_sideways() { let view = Rc::new(Cell::new(CanvasView::new(egui::Rect::ZERO, Point::new(2000.0, 2000.0), 1.0))); diff --git a/crates/ui-canvas/tests/it/canvas/tool_keys.rs b/crates/ui-canvas/tests/it/canvas/tool_keys.rs index aab42724d1..41eedb0ef4 100644 --- a/crates/ui-canvas/tests/it/canvas/tool_keys.rs +++ b/crates/ui-canvas/tests/it/canvas/tool_keys.rs @@ -20,7 +20,7 @@ use craft_ui::dialog::Dialog; use craft_ui::display::Text; use craft_ui::popover::Popover; use craft_ui::primitives::Draw; -use craft_ui::runtime::commands::{self, EditCommands, FireSource}; +use craft_ui::runtime::commands::{self, CommandSet as _, EditCommands, FireSource}; use craft_ui::runtime::frame::take_output; use craft_ui::testing::access::Declared; use craft_ui::testing::focus::{AccessActionKind, key_release}; @@ -169,6 +169,21 @@ fn a_fired_command_whose_key_the_tool_claims_reaches_it_with_nothing_focused() { assert!(take_output(canvas.fixture().ctx()).fired.is_empty(), "no app command ran"); } +/// A command a button fires runs as the button's command, though the tool claims its key: only a menu's or the +/// palette's stands for the key (a toolbar's tool button finishes a gesture the tool holds the keyboard for). +#[trial] +fn a_pointer_fired_command_whose_key_the_tool_claims_runs_as_a_command() { + let mut canvas = ToolFixture::new("Document", Outline::new(true)); + canvas.fixture().settle(); + assert_eq!(canvas.fixture().focused(), None, "nothing is focused"); + take_output(canvas.fixture().ctx()); + assert!(commands::fire(canvas.fixture().ctx(), EditCommands::Delete, FireSource::Pointer), "Delete runs"); + canvas.fixture().settle(); + assert_eq!(canvas.tool().seen, [], "the tool got no Delete"); + let fired = take_output(canvas.fixture().ctx()).fired; + assert!(fired.iter().any(|fired| fired.command.id == EditCommands::Delete.id()), "the app's Delete ran: {fired:?}"); +} + /// A tool that takes every key the host offers it, and the lone Alt tap while `taps`. #[derive(Default)] struct Taker { diff --git a/crates/ui-contract/src/contract/mod.rs b/crates/ui-contract/src/contract/mod.rs index a00a5fad11..b235259b84 100644 --- a/crates/ui-contract/src/contract/mod.rs +++ b/crates/ui-contract/src/contract/mod.rs @@ -426,6 +426,12 @@ pub trait Component: Meta + Sized { 0.0 } + /// The variant an instance that asks for none takes in `env`; `None` takes the style's first. A variant the caller + /// asks for always stands. Read only `#[env(style)]` values, which the style cache keys on. + fn default_variant(_env: &crate::runtime::env::Env) -> Option { + None + } + /// Pure function of the resolved context and the key. fn style(cx: &StyleCx<'_>, key: Self::StyleKey) -> Self::Style; diff --git a/crates/ui-contract/src/contract/overlay/host.rs b/crates/ui-contract/src/contract/overlay/host.rs index d16b5617bf..25ebaa196e 100644 --- a/crates/ui-contract/src/contract/overlay/host.rs +++ b/crates/ui-contract/src/contract/overlay/host.rs @@ -253,6 +253,7 @@ pub(crate) fn host(ctx: &Context, layer: &Layer<'_>, body: &mut dyn FnMut(&mut U entry.region = layer.region; entry.scoped = scope.is_some(); entry.absorbs = overlay.dismiss.outside == Outside::Absorb; + entry.closes_on_commands = overlay.dismiss.commands; overlay::record(ctx, entry); let dismissed = if layer.exiting { None } else { dismissal(ctx, layer, shown.rect, anchor, scope, &mut memory) }; // The layer closes after its body ran: the run shows it open, so a record of the run is not replayed. @@ -330,6 +331,7 @@ fn host_in_popup(ctx: &Context, layer: &Layer<'_>, popup: PopupRoom, body: &mut entry.exiting = layer.exiting; entry.scoped = scope.is_some(); entry.absorbs = overlay.dismiss.outside == Outside::Absorb; + entry.closes_on_commands = overlay.dismiss.commands; entry.window = true; entry.popup = true; overlay::record(ctx, entry); diff --git a/crates/ui-contract/src/contract/overlay/props.rs b/crates/ui-contract/src/contract/overlay/props.rs index 2d9d8dfe6c..a01d00a92f 100644 --- a/crates/ui-contract/src/contract/overlay/props.rs +++ b/crates/ui-contract/src/contract/overlay/props.rs @@ -41,14 +41,16 @@ pub struct Dismiss { pub on_activate: bool, /// The anchor is no longer shown. pub anchor_gone: bool, + /// A command a key, a native menu pick or the palette ran, from outside the layer and the layers opened from it. + pub commands: bool, /// Seconds after opening. pub timeout: Option, } impl Dismiss { - /// An outside press closes; nothing else does. + /// An outside press or a command closes; nothing else does. pub const fn new() -> Self { - Dismiss { outside: Outside::Close, enter: false, focus_left: false, on_activate: false, anchor_gone: true, timeout: None } + Dismiss { outside: Outside::Close, enter: false, focus_left: false, on_activate: false, anchor_gone: true, commands: true, timeout: None } } /// Sets what an outside press does. @@ -75,6 +77,13 @@ impl Dismiss { self } + /// Closes when a key, a native menu pick or the palette runs a command from outside it; off for a layer its host + /// opens and closes, as a dock panel's flyout. + pub const fn commands(mut self, on: bool) -> Self { + self.commands = on; + self + } + /// Closes after `seconds`. pub const fn timeout(mut self, seconds: Option) -> Self { self.timeout = seconds; diff --git a/crates/ui-contract/src/contract/run.rs b/crates/ui-contract/src/contract/run.rs index 6c9eaa541f..a9bb2f0fa2 100644 --- a/crates/ui-contract/src/contract/run.rs +++ b/crates/ui-contract/src/contract/run.rs @@ -500,8 +500,9 @@ pub(crate) trait Erased { fn common(&self) -> &Common; /// Moves `Common` out of the component (step 1). fn take_common(&mut self) -> Common; - /// The variant asked for (or the style's first) and the variant the type accepts for it. - fn variants(&self, asked: Option) -> (Variant, Variant); + /// The variant asked for (or the type's default in `env`, or the style's first) and the variant the type accepts + /// for it. + fn variants(&self, asked: Option, env: &Env) -> (Variant, Variant); /// Step 2. fn style(&mut self, ctx: &Context, scx: &StyleCx<'_>) -> Arc; /// Step 4: keeps the shown value, and outside a sizing pass the cancels it read. Returns whether the binding is mixed. @@ -1565,7 +1566,7 @@ fn begin(t: &mut dyn Erased, ui: &Ui) -> Box { // scope, and everything it shows inherits it. let env = scoped_env(&ctx, Env::of(ui), t.theme_scope()); let common: Common = t.take_common(); - let step1 = steps::env(&ctx, &env, &common, t.variants(common.variant)); + let step1 = steps::env(&ctx, &env, &common, t.variants(common.variant, &env)); // 2 style let style = t.style(&ctx, &steps::style_cx(&ctx, &env, &step1)); // 3 id @@ -1932,7 +1933,7 @@ pub(super) fn measure_shape( let env = scoped_env(ui.ctx(), env, t.theme_scope()); let id = id.unwrap_or_else(|| steps::id(ui, &t.common().id, false, false, facts.style_key, facts.name)); let common = t.common().clone(); - let step1 = steps::env(ui.ctx(), &env, &common, t.variants(common.variant)); + let step1 = steps::env(ui.ctx(), &env, &common, t.variants(common.variant, &env)); let mixed = t.peek_value(ui.ctx(), id, step1.command.as_deref()); let scx = steps::style_cx(ui.ctx(), &env, &step1); let style = t.style(ui.ctx(), &scx); diff --git a/crates/ui-contract/src/contract/run/typed.rs b/crates/ui-contract/src/contract/run/typed.rs index e9f5eb1c93..c3e9e325e1 100644 --- a/crates/ui-contract/src/contract/run/typed.rs +++ b/crates/ui-contract/src/contract/run/typed.rs @@ -136,8 +136,8 @@ impl Erased for Typed<'_, '_, C> { common } - fn variants(&self, asked: Option) -> (Variant, Variant) { - steps::variants::(asked) + fn variants(&self, asked: Option, env: &Env) -> (Variant, Variant) { + steps::variants::(asked, env) } fn style(&mut self, ctx: &Context, scx: &StyleCx<'_>) -> Arc { @@ -708,7 +708,7 @@ pub(crate) fn paint_face( let ctx = ui.ctx().clone(); let common = std::mem::take(face.common_mut(Internal::new())); debug_assert!(common.tooltip.is_none(), "a face instance carries no tooltip; use `PartBuilder::tooltip`"); - let step1 = steps::env(&ctx, env, &common, steps::variants::(common.variant)); + let step1 = steps::env(&ctx, env, &common, steps::variants::(common.variant, env)); let scx = steps::style_cx(&ctx, env, &step1); let scx = source.ink.map_or(scx, |ink| scx.hosted(ink, source.muted)); let style = steps::style::(&ctx, &scx, face.style_key()); @@ -815,7 +815,7 @@ pub(crate) fn member_prepare(ui: &Ui, env: &Env, id: Id, row: Rect, hov let ctx = ui.ctx(); let mut common = std::mem::take(item.common_mut(Internal::new())); let tooltip = common.tooltip.take(); - let step1 = steps::env(ctx, env, &common, steps::variants::(common.variant)); + let step1 = steps::env(ctx, env, &common, steps::variants::(common.variant, env)); let style = steps::style::(ctx, &steps::style_cx(ctx, env, &step1), item.style_key()); let (shown, mixed) = steps::peek_value(&mut item, ctx, id, step1.command.as_deref()); if let Some(key) = item.bind().and_then(|bind| bind.key(id)) { diff --git a/crates/ui-contract/src/contract/steps/env.rs b/crates/ui-contract/src/contract/steps/env.rs index 329e4f6161..5a46e83e39 100644 --- a/crates/ui-contract/src/contract/steps/env.rs +++ b/crates/ui-contract/src/contract/steps/env.rs @@ -22,10 +22,10 @@ pub(crate) struct EnvStep { pub command: Option>, } -/// The variant `asked` for, else the style's first, and the variant `C` accepts for it. -pub(crate) fn variants(asked: Option) -> (Variant, Variant) { +/// The variant `asked` for, else `C`'s default in `env`, else the style's first, and the variant `C` accepts for it. +pub(crate) fn variants(asked: Option, env: &Env) -> (Variant, Variant) { let default = ::VARIANTS.first().copied().unwrap_or(Variant::SECONDARY); - let requested = asked.unwrap_or(default); + let requested = asked.or_else(|| C::default_variant(env)).unwrap_or(default); (requested, accepted_variant::(requested).variant) } diff --git a/crates/ui-contract/src/runtime/commands/board.rs b/crates/ui-contract/src/runtime/commands/board.rs index 7af58b6f80..c06b9a8686 100644 --- a/crates/ui-contract/src/runtime/commands/board.rs +++ b/crates/ui-contract/src/runtime/commands/board.rs @@ -1731,10 +1731,11 @@ fn queue(ctx: &Context, fired: Fired) { observed.push(fired.command.clone()); } }); - // A command whose key the focused component claims reaches it as that key, as the key's press does; an edit command - // goes to the focused component that lists it; otherwise it goes to the instance that declared it or, with none, - // stays an app command. - if fired.phase != FirePhase::Release { + // A command run from a menu or the palette whose key the focused component claims reaches it as that key, as the + // key's press does (a button's is the button's command, even while a canvas gesture claims every key); an edit + // command goes to the focused component that lists it; otherwise it goes to the instance that declared it or, with + // none, stays an app command. + if fired.phase != FirePhase::Release && matches!(fired.source, FireSource::Menu | FireSource::Palette) { let chords: Vec = bindings(ctx, &fired.command).into_iter().filter(|binding| !binding.trigger.is_double()).map(|binding| binding.trigger.chord).collect(); if keys::fire_claimed(ctx, &chords) { diff --git a/crates/ui-contract/src/runtime/env/units.rs b/crates/ui-contract/src/runtime/env/units.rs index 30cefec0ad..52647c4b64 100644 --- a/crates/ui-contract/src/runtime/env/units.rs +++ b/crates/ui-contract/src/runtime/env/units.rs @@ -467,6 +467,12 @@ impl Units { self.template(kind).replace("{n}", "").trim().to_owned() } + /// The text before and after the number in the user's language, spacing included: `("", " mm")`, `("", "%")`. + pub fn affixes(&self, kind: UnitKind) -> (String, String) { + let template = self.template(kind); + template.split_once("{n}").map_or_else(|| (String::new(), template.to_owned()), |(before, after)| (before.to_owned(), after.to_owned())) + } + /// The digits after the decimal mark `n` needs within `decimals`: the fewest that show it as it rounds at the most. fn digits(n: f64, decimals: &RangeInclusive) -> usize { let (least, most) = (*decimals.start(), *decimals.end()); diff --git a/crates/ui-contract/src/runtime/focus.rs b/crates/ui-contract/src/runtime/focus.rs index 46d12f0f59..7a46482fb8 100644 --- a/crates/ui-contract/src/runtime/focus.rs +++ b/crates/ui-contract/src/runtime/focus.rs @@ -62,7 +62,7 @@ pub(crate) struct ScopeRec { /// The stop that held focus when the scope was first pushed, or for a scope that does not trap the stop focus last /// entered it from, which `restore` returns to. pub(crate) opener: Option, - /// The scope's layer is playing its exit: focus inside it already returns to the opener. + /// The scope's layer is playing its exit: focus inside it leaves at once, to the opener or nowhere. pub(crate) closing: bool, /// For a layer's scope: whether this is its first pass since the layer appeared, as the layer's memory says; /// none for other scopes, which are new after a gap of a frame. diff --git a/crates/ui-contract/src/runtime/focus/nav.rs b/crates/ui-contract/src/runtime/focus/nav.rs index 208816b998..8dce33400b 100644 --- a/crates/ui-contract/src/runtime/focus/nav.rs +++ b/crates/ui-contract/src/runtime/focus/nav.rs @@ -571,29 +571,44 @@ impl State { Some(self.focus_stop(member)) } - /// The focus move when the focused stop was not registered this pass: a removed child of a collection row hands - /// focus back to the row, as Escape does; any other removed stop leaves focus nowhere, whatever stops are left - /// around it. + /// The focus move when the focused stop was not registered this pass, or only inside a layer that plays its exit + /// (`fading`): a removed child of a collection row hands focus back to the row, as Escape does; any other removed + /// stop leaves focus nowhere, whatever stops are left around it. fn removed_focus(&mut self, focused: Option) -> Option> { let root = focused?; let key = *self.focused.get(&root)?; - if self.stops.iter().any(|rec| rec.stop.key() == key) { + let live = |rec: &&StopRec| !self.fading(rec.scope); + if self.stops.iter().filter(live).any(|rec| rec.stop.key() == key) { return None; } - let gone = self.last_stops.iter().find(|rec| rec.stop.key() == key)?; + let gone = self.find_stop(key)?; let row = gone.stop.group.and_then(|group| self.group(group)).filter(|group| group.row); - let owner = row.and_then(|group| self.row_owner(&group)).filter(|owner| self.stops.iter().any(|rec| rec.stop.key() == owner.stop.key())); + let owner = + row.and_then(|group| self.row_owner(&group)).filter(|owner| self.stops.iter().filter(live).any(|rec| rec.stop.key() == owner.stop.key())); // A removed stop in an arena (an editor or control in a canvas body) hands focus back to the arena root's own // stop (the canvas). - let target = owner - .or_else(|| gone.stop.arena.and_then(|arena| self.stops.iter().find(|rec| rec.stop.id == arena && rec.stop.part.is_none()).cloned())); + let target = owner.or_else(|| { + gone.stop.arena.and_then(|arena| self.stops.iter().filter(live).find(|rec| rec.stop.id == arena && rec.stop.part.is_none()).cloned()) + }); Some(match target { Some(target) => self.focus_stop_from(target, FocusOrigin::Removal), None => vec![Act::Surrender(root)], }) } - /// The opener of a scope that went away while focus was inside it. + /// Whether the scope `scope` of this pass, or one around it, is a layer playing its exit: its stops take no focus. + fn fading(&self, scope: Option) -> bool { + let mut at = scope; + while let Some(rec) = at.and_then(|id| self.scopes.get(&id)) { + if rec.closing { + return true; + } + at = rec.parent; + } + false + } + + /// The opener of a scope that went away, or plays its exit, while focus was inside it. fn restored_focus(&self, focused: Option) -> Option { let root = focused?; let key = *self.focused.get(&root).unwrap_or(&(root, None)); diff --git a/crates/ui-contract/src/runtime/keys/route.rs b/crates/ui-contract/src/runtime/keys/route.rs index a889e9d4dc..07f405ab1c 100644 --- a/crates/ui-contract/src/runtime/keys/route.rs +++ b/crates/ui-contract/src/runtime/keys/route.rs @@ -140,7 +140,8 @@ pub(crate) fn begin(ctx: &Context, press_captured: bool) -> EscapeRouting { // session control on a canvas), unless a modal layer is open. The window's document canvas is its key target // (`focus::host_canvas`): Page Up and Down, Home and End page it as they do while it has the focus. What the // canvas takes is its alone, as while it has the focus: the app's shortcuts do not run with it too. It takes the - // arrows with the modifiers it acts on (`KeyUse::nudge_mods`); the others are the app's. + // arrows with the modifiers it acts on (`KeyUse::nudge_mods`); the others are the app's, as is a page key bound to + // a command that runs now (`page_key_runs`). let declared = |mods: Mods| canvas.as_ref().is_none_or(|canvas| canvas.stop.keys.nudge_mods.contains(mods)); for (press, taken) in batch.presses.iter().zip(&mut consumed).filter(|(press, _)| !press.canvas) { if let Some(id) = hover_delete @@ -161,6 +162,7 @@ pub(crate) fn begin(ctx: &Context, press_captured: bool) -> EscapeRouting { } else if let Some(canvas) = &canvas && let Some(Intent::Move(mv @ (NavMove::PageUp | NavMove::PageDown | NavMove::Start | NavMove::End), mods)) = keys::intent(os, press.key, press.mods, canvas.stop.role) + && !page_key_runs(ctx, canvas, press) { push(&mut routed, Some(canvas.stop.id), Intent::Move(mv, mods), false); *taken = Taken::Canvas; @@ -279,6 +281,18 @@ fn remap_mods(mods: &[(usize, Mods)], kept: &[bool]) -> Vec<(usize, Mods)> { mods.iter().map(|(at, held)| (kept.get(..*at).unwrap_or(kept).iter().filter(|stays| **stays).count(), *held)).collect() } +/// Whether `press`, a page key (Page Up or Down, Home, End) of the window's document canvas `canvas`, focused or the +/// unfocused window's key target, runs the command the window's keymap binds it to (`commands::runs_now`): that app +/// shortcut goes ahead of the canvas's page scroll (Q370), as the keymap ran it before the canvas paged. A canvas's +/// editor part keeps its page keys as its input. +fn page_key_runs(ctx: &Context, canvas: &StopRec, press: &Press) -> bool { + let keys = &canvas.stop.keys; + keys.chrome_key + && !keys.is_document_editor() + && matches!(press.key, Key::PageUp | Key::PageDown | Key::Home | Key::End) + && commands::runs_now(ctx, crate::runtime::egui::pass::current_viewport(ctx), &Chord { mods: press.mods, key: press.key }) +} + pub(super) fn push(routed: &mut HashMap, Routed>, target: Option, intent: Intent, horizontal: bool) { routed.entry(target).or_default().items.push(Item { intent, horizontal, source: None }); } @@ -689,8 +703,8 @@ fn press_route(ctx: &Context, os: Os, rec: &StopRec, press: &Press, driven: Opti let leaves_row = !caret && is_vertical(mv) && focus::is_row_child(ctx, stop); let kept = caret || (stop.part.is_none() && stop.keys.keep.keeps_arrow(mv)); // A stop that does not act on its moves leaves a move key a scoped command around it binds to that - // command, ahead of its roving group and the scroll owner. - if !leaves_row && !kept && !stop.role.moves && commands::binds_scoped(ctx, &chord) { + // command, ahead of its roving group and the scroll owner; the document canvas leaves a bound page key. + if (!leaves_row && !kept && !stop.role.moves && commands::binds_scoped(ctx, &chord)) || page_key_runs(ctx, rec, press) { PressRoute::Free } else { PressRoute::Move(mv, mods) diff --git a/crates/ui-contract/src/runtime/overlay.rs b/crates/ui-contract/src/runtime/overlay.rs index f8b607866f..5046e20d53 100644 --- a/crates/ui-contract/src/runtime/overlay.rs +++ b/crates/ui-contract/src/runtime/overlay.rs @@ -168,6 +168,8 @@ pub struct OpenEntry { pub(crate) scoped: bool, /// A press outside its family closes it and goes no further. pub(crate) absorbs: bool, + /// A command run from outside it closes it (`Dismiss::commands`). + pub(crate) closes_on_commands: bool, /// The entry is an OS window of the integration: it takes its place in the stack's order and facts, and no egui /// layer is shown for it. pub(crate) window: bool, @@ -225,6 +227,7 @@ impl OpenEntry { cover: None, scoped: false, absorbs: false, + closes_on_commands: true, window: false, popup: false, region: None, @@ -365,7 +368,8 @@ pub fn request_close(ctx: &Context, id: Id, why: CloseReason) { push_close(ctx, id, why, false); } -/// Queues a close of every popup layer of the running viewport shown last frame: its menus, dropdowns and lists. The +/// Queues a close of every popup layer of the running viewport shown last frame that a command closes +/// (`Dismiss::commands`): its menus, dropdowns and lists, not a dock panel's flyout. The /// runtime's command dispatcher calls it when a key runs a command; an app whose own dispatcher runs a shortcut from the /// keys the runtime leaves in egui's input calls it when the shortcut runs. Either way the command closes the open /// popups as a menu pick does; modal layers, windows and toasts stay. @@ -387,7 +391,11 @@ pub(crate) fn close_popups_outside(ctx: &Context, inside: &[Id]) { at = pass.last.iter().find(|entry| entry.id == id).and_then(|entry| entry.parent); } } - pass.last.iter().filter(|entry| entry.rank == Rank::Popup && !entry.exiting && !kept.contains(&entry.id)).map(|entry| entry.id).collect() + pass.last + .iter() + .filter(|entry| entry.rank == Rank::Popup && entry.closes_on_commands && !entry.exiting && !kept.contains(&entry.id)) + .map(|entry| entry.id) + .collect() }); for id in popups { push_close(ctx, id, CloseReason::Requested, false); diff --git a/crates/ui-contract/src/testing/key_trials.rs b/crates/ui-contract/src/testing/key_trials.rs index 1efd74fce8..ff1e4e6cfa 100644 --- a/crates/ui-contract/src/testing/key_trials.rs +++ b/crates/ui-contract/src/testing/key_trials.rs @@ -231,9 +231,10 @@ fn a_recorder_reads_a_press_as_one_chord_and_no_command_runs() { assert_eq!(press_k("button").0, Vec::new(), "no other role reads chords"); } -/// With nothing focused, the window's document canvas takes Page Down and the arrows' nudge, as while it has the focus; -/// the press is its alone, so no app shortcut runs with it as well (a page view would turn twice). Without a canvas the -/// press is the app's. +/// With nothing focused, the window's document canvas takes the arrows' nudge and an unbound Page Up, as while it has +/// the focus; the press is its alone, so no app shortcut runs with it as well (a page view would turn twice). A page key +/// the app binds to a command that runs is the app's (Page Down to the next artboard). Without a canvas every press is +/// the app's. #[trial] fn an_unfocused_press_the_window_canvas_takes_reaches_no_app_shortcut() { let paged = Rc::new(Cell::new(0)); @@ -245,8 +246,10 @@ fn an_unfocused_press_the_window_canvas_takes_reaches_no_app_shortcut() { stop(ui, "canvas", KeyUse::CANVAS); } let mut intents = intents_of(ui.ctx(), Some(id("canvas")), false); - if intents.take(Intent::Move(craft_behavior::NavMove::PageDown, craft_behavior::MoveMods::PLAIN)) { - sink.set(sink.get() + 1); + for page in [craft_behavior::NavMove::PageDown, craft_behavior::NavMove::PageUp] { + if intents.take(Intent::Move(page, craft_behavior::MoveMods::PLAIN)) { + sink.set(sink.get() + 1); + } } }; let mut bound = Overrides::default(); @@ -256,18 +259,21 @@ fn an_unfocused_press_the_window_canvas_takes_reaches_no_app_shortcut() { frames.commands(CommandInput::new().overrides(Arc::new(bound))); frames.frame(Vec::new(), &mut show); take_output(&frames.ctx); - let fired = |frames: &mut Frames, show: &mut dyn FnMut(&mut Ui)| { - frames.frame(vec![key_press(Key::PageDown, Modifiers::NONE), key_press(Key::ArrowRight, Modifiers::NONE)], &mut *show); - // Released, so the next round's presses are fresh presses, not repeats of held keys. - frames.frame(vec![key_release(Key::PageDown, Modifiers::NONE), key_release(Key::ArrowRight, Modifiers::NONE)], &mut *show); + let fired = |frames: &mut Frames, show: &mut dyn FnMut(&mut Ui), key: Key| { + frames.frame(vec![key_press(key, Modifiers::NONE), key_release(key, Modifiers::NONE)], &mut *show); + frames.frame(Vec::new(), &mut *show); take_output(&frames.ctx).fired.len() }; - assert_eq!(fired(&mut frames, &mut show), 0, "neither press reaches the app's commands"); + assert_eq!(fired(&mut frames, &mut show, Key::ArrowRight), 0, "the arrow is the canvas's nudge"); + assert_eq!(fired(&mut frames, &mut show, Key::PageUp), 0, "the unbound Page Up is the canvas's"); assert_eq!(paged.get(), 1, "the canvas pages"); + assert_eq!(fired(&mut frames, &mut show, Key::PageDown), 1, "the bound Page Down is the app's"); + assert_eq!(paged.get(), 1, "the canvas does not page with it"); canvas.set(false); frames.idle(2, &mut show); take_output(&frames.ctx); - assert_eq!(fired(&mut frames, &mut show), 2, "without a canvas both presses are the app's"); + let presses = [Key::PageDown, Key::ArrowRight].map(|key| fired(&mut frames, &mut show, key)); + assert_eq!(presses, [1, 1], "without a canvas both presses are the app's"); } /// A recorder holds every press: the app reads none from egui's input, and `focus_holds` answers so before the press. diff --git a/crates/ui-contract/tests/it/runtime/focus.rs b/crates/ui-contract/tests/it/runtime/focus.rs index f6e80e4d0e..f515edf153 100644 --- a/crates/ui-contract/tests/it/runtime/focus.rs +++ b/crates/ui-contract/tests/it/runtime/focus.rs @@ -74,3 +74,38 @@ fn a_request_in_a_press_pass_keeps_the_focus_from_the_press() { craft_ui::testing::pointer::click(&mut frames, at.get().center(), &mut show); assert_eq!(egui_focused(&frames.ctx), Some(editor), "the request of the press's pass holds"); } + +/// A popover opened with nothing focused closes while a stop in it holds the focus: from the first pass of its exit +/// fade, while its body still draws, the focus is nowhere, so a key pressed during the fade is not the stop's +/// (VectorCraft: Cmd+A after the Artboards flyout closed still selected the list's rows). +#[trial] +fn a_stop_in_a_layer_that_fades_out_loses_the_focus_at_once() { + use craft_behavior::overlay::{Align, Side}; + use craft_ui::contract::overlay::{Anchor, Place}; + use craft_ui::contract::{Mount, Overlay, Sizing}; + let seen = RefCell::new(Seen::default()); + let (close, drawn) = (Cell::new(false), Cell::new(0u32)); + let mut show = |ui: &mut Ui| { + let overlay = Overlay::popover().place(Place::anchored(Anchor::Rect(Rect::from_min_size(ORIGIN, VIEW)), Side::Below, Align::Start)); + Slab::new(ContainerProps::new().mount(Mount::Layer(overlay)).sizing(Sizing::Content)).id_salt("flyout").show(ui, |ui, cx| { + drawn.set(drawn.get() + 1); + if close.get() { + cx.request_close(); + } + Probe::new(&seen).label("List").id_salt("list").show(ui); + }); + }; + let mut frames = Frames::new(); + frames.idle(3, &mut show); + let list = seen.borrow().id.expect("the list ran"); + request(&frames.ctx, FocusTarget::Id(list)); + frames.idle(2, &mut show); + assert_eq!(craft_ui::testing::focus::egui_focused(&frames.ctx), Some(list), "the list took the focus"); + close.set(true); + frames.idle(1, &mut show); + close.set(false); + drawn.set(0); + frames.idle(1, &mut show); + assert!(drawn.get() > 0, "the layer still draws its fade"); + assert_eq!(craft_ui::testing::focus::egui_focused(&frames.ctx), None, "the fading layer's stop has no focus"); +} diff --git a/crates/ui-panels/src/docking/flyout.rs b/crates/ui-panels/src/docking/flyout.rs index 8b62c56a1a..645360fbc5 100644 --- a/crates/ui-panels/src/docking/flyout.rs +++ b/crates/ui-panels/src/docking/flyout.rs @@ -90,13 +90,18 @@ impl Flyout { let bounded = self.within.is_finite(); let least = if bounded { self.least.min(self.within.size().max(Vec2::ZERO)) } else { self.least }; // A float place as well as the caller's position: the placement pins no edge, so the edge set alone decides - // the grips. + // the grips. The host's binding opens and closes the flyout, so a command leaves it open. let overlay = Overlay::popover() .place(Place::Float(FloatPlace::at(top_left))) .placed_at(top_left) .size_limits(SizeLimits::at_least(least)) .resize_edges(free.union(ResizeEdges::TOP).union(ResizeEdges::BOTTOM)) - .dismiss(Dismiss::new().outside(if self.auto_collapse { Outside::Close } else { Outside::Keep }).focus_left(self.auto_collapse)) + .dismiss( + Dismiss::new() + .outside(if self.auto_collapse { Outside::Close } else { Outside::Keep }) + .focus_left(self.auto_collapse) + .commands(false), + ) .body_scroll(false); if bounded { overlay.bounds(self.within) } else { overlay } } diff --git a/crates/ui-panels/src/docking/iconic/trials.rs b/crates/ui-panels/src/docking/iconic/trials.rs index 65ad0bdbf4..1b1f02a339 100644 --- a/crates/ui-panels/src/docking/iconic/trials.rs +++ b/crates/ui-panels/src/docking/iconic/trials.rs @@ -1,15 +1,20 @@ //! Trials of `IconicColumn`: the letter of a panel without an icon, the names a wide column shows, the grips of its -//! groups, and the resizes of its flyouts. +//! groups, the resizes of its flyouts, and a flyout that a command leaves open. #![allow(clippy::panic, clippy::expect_used, reason = "trials assert by panicking")] use super::GRIP; +use crate::buttons::Button; +use crate::contract::overlay::{self, OpenFilter}; use crate::contract::{Bind, Show as _, ShowContainer as _}; use crate::docking::group::GRIP_ABOVE; use crate::docking::{ DockHeights, DockSizes, DockSpot, DockTargets, DragUnit, FlyoutResize, GroupAt, GroupDrag, GroupGrip, IconicColumn, PanelKey, PanelSpec, }; +use crate::runtime::commands::{AppCatalog, Binding, CommandDef, CommandInput, Scope}; use crate::runtime::drag; use crate::runtime::env::Direction; +use crate::runtime::focus::{FocusTarget, request}; +use crate::runtime::frame::take_output; use crate::sections::Panel; use crate::style::StyleCx; use crate::testing::memory::global; @@ -18,7 +23,7 @@ use crate::testing::{Fixture, trial}; use craft_behavior::DockSide; use craft_behavior::dock::{Action, Column, DockEdge, Group, Layout, Node}; use craft_behavior::overlay::Side; -use egui::{Pos2, Rect, Vec2}; +use egui::{Key, Modifiers, Pos2, Rect, UiBuilder, Vec2}; use std::cell::{Cell, RefCell}; use std::rc::Rc; @@ -238,6 +243,53 @@ fn a_press_outside_closes_the_flyout_only_with_auto_collapse() { } } +/// The app command the trials bind to a key. +const NUDGE: &str = "flyoutTrial.nudge"; + +/// A key that runs an app command, with a stop in the open flyout focused, leaves the flyout open and live in every +/// pass and the stop focused, with Auto-Collapse Iconic Panels off or on: the host's binding opens and closes a flyout, +/// and a command closes only the transient popups (menus, dropdowns, lists). +#[trial] +fn a_key_command_leaves_the_open_flyout_and_the_focus_in_it() { + for auto_collapse in [false, true] { + let (open, stop, faded) = (Rc::new(Cell::new(None)), Rc::new(Cell::new(None)), Rc::new(Cell::new(false))); + let (seen, shown, fade) = (Rc::clone(&open), Rc::clone(&stop), Rc::clone(&faded)); + let place = Rect::from_min_size(Pos2::ZERO, Vec2::new(RAIL, SCREEN.y)); + let mut fixture = Fixture::new(move |ui| { + let column = Column::new(vec![Group::new(vec![0, 1], 0)]); + let mut now = seen.get(); + IconicColumn::new("Panels", global("iconic column", "commands"), &column, Bind::bound(&mut now), &spec) + .within(screen()) + .auto_collapse(auto_collapse) + .show_flyouts_at(ui, place, |_, at, ui, _| { + let GroupAt::Show(rect) = at else { return None }; + shown.set(Some(ui.scope_builder(UiBuilder::new().max_rect(rect), |ui| Button::new("Snap").show(ui).id).inner)); + None + }); + // Last pass the open flyout was not among the live layers that take keys: it played its exit. + fade.set(fade.get() || (now.is_some() && !overlay::any_open(ui.ctx(), OpenFilter::Keys))); + seen.set(now); + }); + let binding = Binding::parse("F9").expect("the trial's chord parses"); + let catalog = AppCatalog::new(vec![CommandDef::new(NUDGE, NUDGE, Scope::app()).with_default(binding)], 1).expect("the catalog is taken"); + fixture.commands(CommandInput::new().catalog(catalog)).room(SCREEN).settle(); + let icon = fixture.by_label("Swatches").expect("the Swatches icon").rect.center(); + fixture.click_at(icon).settle(); + let button = stop.get().expect("the flyout shows its stop"); + request(fixture.ctx(), FocusTarget::Id(button)); + fixture.settle(); + assert_eq!(fixture.focused_stop().map(|(id, _)| id), Some(button), "auto-collapse {auto_collapse}: the flyout's stop has the focus"); + faded.set(false); + take_output(fixture.ctx()); + fixture.key(Key::F9, Modifiers::NONE).settle(); + let fired = take_output(fixture.ctx()).fired; + assert!(fired.iter().any(|fired| fired.command.id == NUDGE), "auto-collapse {auto_collapse}: the key runs its command"); + assert_eq!(open.get(), Some(1), "auto-collapse {auto_collapse}: the flyout stays open"); + assert!(!faded.get(), "auto-collapse {auto_collapse}: and never plays its exit"); + assert_eq!(fixture.focused_stop().map(|(id, _)| id), Some(button), "auto-collapse {auto_collapse}: and its stop keeps the focus"); + } +} + /// The top edge and the free top corner grow the flyout upward on either window edge: the bottom and the column-side /// edge stay, the column-side edge has no grip, and the new top is kept as an offset from the icons, so it survives /// another group's flyout and reopening. diff --git a/crates/ui-patterns/tests/it/form_dialogs/picker.rs b/crates/ui-patterns/tests/it/form_dialogs/picker.rs index 2036ecdd26..b16ce939aa 100644 --- a/crates/ui-patterns/tests/it/form_dialogs/picker.rs +++ b/crates/ui-patterns/tests/it/form_dialogs/picker.rs @@ -130,3 +130,70 @@ fn a_picker_dialog_settles_after_opening() { assert!(passes[2..].iter().all(|&n| n == 1), "{name}: every frame from the third runs one pass: {passes:?}; {warned:?}"); } } + +/// A form dialog with two panes side by side, as Export for Screens lays them out: a heading, a grid of boards and a +/// row of a button and a text field that takes the focus as the dialog opens, and options beside. Counts the button's +/// clicks and the grid's selection events. +fn panes_with_a_field(clicks: &Rc>, picks: &Rc>) -> Fixture { + use craft_ui::buttons::Button; + use craft_ui::contract::{CollectionEvent, Props as _}; + use craft_ui::list::ToggleState; + use craft_ui::runtime::focus::FocusRequest; + use craft_ui::text::TextField; + let opening = Rc::new(Cell::new(true)); + let (clicks, picks, opens) = (clicks.clone(), picks.clone(), opening.clone()); + let mut fixture = Fixture::new(move |ui| { + let mut value = String::new(); + FormDialog::new("Export", Bind::bound(&mut value)).show(ui, |ui, _, _| { + let keys: Vec = (0..3).collect(); + let source = keyed(&keys, |key: &u64| *key); + Row::new().show(ui, |ui, _| { + Stack::new().show(ui, |ui, _| { + Text::new("Artboards").show(ui); + let out = TileGrid::new("Boards").checks(true).max_rows(3).show_items(ui, &source, &mut |key, _| { + Tile::new(format!("Board {key}")).check(ToggleState::Off).thumb(ThumbAspect::SQUARE, |_, _| {}) + }); + picks.set(picks.get() + out.response.events.iter().filter(|event| matches!(event, CollectionEvent::Selection { .. })).count()); + Row::new().show(ui, |ui, _| { + clicks.set(clicks.get() + Button::new("Clear Selection").show(ui).clicks); + let field = TextField::new("Prefix", Bind::given(String::new())); + if opens.get() { field.request_focus(FocusRequest::Take) } else { field }.show(ui); + }); + }); + Stack::new().show(ui, |ui, _| { + Text::new("Options").show(ui); + }); + }); + true + }); + }); + fixture.room(egui::vec2(1024.0, 768.0)); + fixture.settle(); + opening.set(false); + assert!(fixture.focused_stop().is_some(), "the field takes the focus"); + fixture +} + +/// A press on a button in a row beside a focused text field, under a grid, is the button's: the pane's room holds the +/// grid's rows and what follows them. (The field keeps the focus, as a dialog's field does when one of its buttons is +/// pressed.) +#[trial] +fn a_press_on_a_button_beside_a_field_is_the_buttons() { + let (clicks, picks) = (Rc::new(Cell::new(0)), Rc::new(Cell::new(0))); + let mut fixture = panes_with_a_field(&clicks, &picks); + let button = fixture.by_label("Clear Selection").expect("the button shows"); + fixture.click(&button).settle(); + assert_eq!(clicks.get(), 1, "the press on the button clicks it"); +} + +/// A click on a tile of a grid over a focused text field picks the tile, and takes the focus off the field. +#[trial] +fn a_tile_click_beside_a_focused_field_is_reported() { + let (clicks, picks) = (Rc::new(Cell::new(0)), Rc::new(Cell::new(0))); + let mut fixture = panes_with_a_field(&clicks, &picks); + let field = fixture.focused_stop(); + let tile = fixture.by_label("Board 2").expect("the tile shows"); + fixture.click(&tile).settle(); + assert!(picks.get() > 0, "the grid reports the click on its tile as a selection"); + assert_ne!(fixture.focused_stop(), field, "and the field loses the focus"); +} diff --git a/crates/ui-widgets/src/buttons/button.rs b/crates/ui-widgets/src/buttons/button.rs index f37e6254bf..ac250b92a8 100644 --- a/crates/ui-widgets/src/buttons/button.rs +++ b/crates/ui-widgets/src/buttons/button.rs @@ -37,7 +37,7 @@ const SIDE_MENU_DISABLED_ALPHA: u8 = 110; /// The style of a push button. #[derive(Clone, Debug, PartialEq, ComponentStyle)] -#[style(variants = [Variant::SECONDARY, Variant::PRIMARY, Variant::GHOST, Variant::DANGER, Variant::look(Emphasis::Outline, Tone::Accent)])] +#[style(variants = [Variant::SECONDARY, Variant::PRIMARY, Variant::GHOST, Variant::DANGER, Variant::look(Emphasis::Outline, Tone::Accent), super::FILLED])] #[non_exhaustive] pub struct ButtonStyle { #[style(surface)] @@ -295,6 +295,10 @@ impl Component for Button<'_> { type Style = ButtonStyle; type Output = ButtonOutput; + fn default_variant(env: &crate::runtime::env::Env) -> Option { + super::push_default(env) + } + fn style(cx: &StyleCx<'_>, key: ButtonStyleKey) -> ButtonStyle { let cx = &super::placed(cx); let mut style = match key.tint { diff --git a/crates/ui-widgets/src/buttons/mod.rs b/crates/ui-widgets/src/buttons/mod.rs index 101f7d9fd8..0344266ee5 100644 --- a/crates/ui-widgets/src/buttons/mod.rs +++ b/crates/ui-widgets/src/buttons/mod.rs @@ -63,8 +63,31 @@ pub enum ControlPlace { SideMenu, } -/// The style context a push or split button draws in: in a ribbon (`ControlPlace::Ribbon`) the default variant -/// becomes the ghost one, so the button is flat at rest; any other variant, and any other place, stays as it is. +/// The look of a push or split button that asks for no variant. An app sets it once at its root (`RootEnv::values`); +/// the default is the outline. A button that asks for a variant, `Variant::SECONDARY` included, keeps it; a ribbon's +/// flat look (`ControlPlace::Ribbon`) wins over it, and toggles keep the outline. +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, EnvValue, MemoProps)] +#[env(style)] +#[non_exhaustive] +pub enum PushButtonLook { + /// The outline, filled only by state. + #[default] + Outline, + /// The filled neutral tile with no edge at rest (`Emphasis::Filled`): VectorCraft's buttons. + Filled, +} + +/// The filled neutral variant a push button takes under [`PushButtonLook::Filled`]. +pub(crate) const FILLED: craft_theme::Variant = craft_theme::Variant::look(craft_theme::Emphasis::Filled, craft_theme::variant::Tone::Neutral); + +/// The variant a push or split button that asks for none takes in `env` (`Component::default_variant`): the filled one +/// under [`PushButtonLook::Filled`], outside a ribbon. +pub(crate) fn push_default(env: &crate::runtime::env::Env) -> Option { + (env.get::() == PushButtonLook::Filled && env.get::() != ControlPlace::Ribbon).then_some(FILLED) +} + +/// The style context a push, split or labelled toggle button draws in: in a ribbon (`ControlPlace::Ribbon`) the default +/// variant becomes the ghost one, so the button is flat at rest; any other variant, and any other place, stays as it is. pub(crate) fn placed<'a>(cx: &crate::style::StyleCx<'a>) -> crate::style::StyleCx<'a> { if cx.variant == craft_theme::Variant::SECONDARY && cx.env::() == ControlPlace::Ribbon { cx.with_variant(craft_theme::Variant::GHOST) diff --git a/crates/ui-widgets/src/buttons/split_button.rs b/crates/ui-widgets/src/buttons/split_button.rs index 9e235d7066..504c9f13dc 100644 --- a/crates/ui-widgets/src/buttons/split_button.rs +++ b/crates/ui-widgets/src/buttons/split_button.rs @@ -22,7 +22,7 @@ const ARROW: PartKey = PartKey::new("arrow"); /// The style of a split button: one surface under both parts, each part's hover and pressed fill over it, and a /// divider between them. #[derive(Clone, Debug, PartialEq, ComponentStyle)] -#[style(variants = [Variant::SECONDARY, Variant::PRIMARY, Variant::GHOST, Variant::DANGER, Variant::look(Emphasis::Outline, Tone::Accent)])] +#[style(variants = [Variant::SECONDARY, Variant::PRIMARY, Variant::GHOST, Variant::DANGER, Variant::look(Emphasis::Outline, Tone::Accent), super::FILLED])] #[non_exhaustive] pub struct SplitButtonStyle { #[style(surface)] @@ -161,6 +161,10 @@ impl Component for SplitButton<'_, T> { type Style = SplitButtonStyle; type Output = SplitOutput; + fn default_variant(env: &crate::runtime::env::Env) -> Option { + super::push_default(env) + } + fn style(cx: &StyleCx<'_>, key: SplitButtonStyleKey) -> SplitButtonStyle { let cx = &super::placed(cx); let parts = cx.variant_look(); diff --git a/crates/ui-widgets/src/buttons/stories.rs b/crates/ui-widgets/src/buttons/stories.rs index f379443217..a11b1b3814 100644 --- a/crates/ui-widgets/src/buttons/stories.rs +++ b/crates/ui-widgets/src/buttons/stories.rs @@ -1,8 +1,8 @@ //! Stories of the buttons. use super::{ - Arrangement, Button, ButtonChord, CommandSearch, ControlPlace, GroupLevel, IconButton, Link, PopupMark, PressFocus, SplitButton, SplitMenu, - ToggleButton, + Arrangement, Button, ButtonChord, CommandSearch, ControlPlace, GroupLevel, IconButton, Link, PopupMark, PressFocus, PushButtonLook, SplitButton, + SplitMenu, ToggleButton, }; use crate::contract::{Bind, BodyCx, Entry, LeastWidth, PopupKind, Props as _, Show as _, ShowContainer as _, Sizing, Trigger, Validity}; use crate::display::{Picture, Shade, Text}; @@ -50,6 +50,30 @@ fn button_variants(ui: &mut Ui, data: &mut StoryData) -> StoryOutput { Grid::new(columns).show(ui, |ui, _| rows(ui, states)).into() } +/// The push buttons of an app that sets `PushButtonLook::Filled` at its root: a button, a split button and a disabled +/// button at each size, filled neutral tiles with no edge at rest. Under the pointer they take the hover fill and the +/// control edge, pressed the pressed fill and the accent edge. +#[story(Button<'static>, covers = [], drive = Drive::Never, group = "Variants", title = "Filled")] +fn button_filled(ui: &mut Ui, _: &mut StoryData) -> StoryOutput { + let entries = presets(); + let shown = with_env( + ui, + |overrides| { + overrides.values.set(PushButtonLook::Filled); + }, + |ui| { + Grid::new(&[ColumnWidth::Content; 3]).show(ui, |ui, _| { + for (size_name, size) in SIZES { + Button::new("Cancel").size(size).id_salt(("rest", size_name)).show(ui); + SplitButton::new("Trace", &entries).size(size).id_salt(("split", size_name)).show(ui); + Button::new("Unavailable").size(size).enabled(false).id_salt(("disabled", size_name)).show(ui); + } + }) + }, + ); + shown.into() +} + #[story(Button<'static>, covers = [Default], group = "Playground", title = "Playground")] fn button(ui: &mut Ui, data: &mut StoryData) -> StoryOutput { let variants = [("Primary", Variant::PRIMARY), ("Secondary", Variant::SECONDARY), ("Ghost", Variant::GHOST), ("Danger", Variant::DANGER)]; diff --git a/crates/ui-widgets/src/text/mod.rs b/crates/ui-widgets/src/text/mod.rs index c924d21fe3..fd6daff8c5 100644 --- a/crates/ui-widgets/src/text/mod.rs +++ b/crates/ui-widgets/src/text/mod.rs @@ -19,7 +19,8 @@ pub use chips::{ChipCodec, ChipField, ChipFieldOutput, ChipFieldStyle, ChipWords pub use hex::{HexCodec, HexField}; pub use linked::{LinkMode, LinkedFields, LinkedFieldsStyle, LinkedLayout, LinkedOutput, LinkedWords, follow_equal, follow_ratio, link_toggle}; pub use number::{ - NamedOr, NumberField, NumberName, NumberOutput, NumberPick, NumberStepper, NumberStyle, NumberValue, RangeAlert, StepArrows, UnitPlacement, + NamedOr, NumberField, NumberLook, NumberName, NumberOutput, NumberPick, NumberPrecision, NumberStepper, NumberStyle, NumberValue, RangeAlert, + StepArrows, UnitPlacement, }; pub use selectable_text::{SelectableStyle, SelectableText}; pub use text_field::TextField; diff --git a/crates/ui-widgets/src/text/number.rs b/crates/ui-widgets/src/text/number.rs index f8671b9777..464009b74a 100644 --- a/crates/ui-widgets/src/text/number.rs +++ b/crates/ui-widgets/src/text/number.rs @@ -16,7 +16,7 @@ use crate::contract::{ PartsCx, Pointer as _, Props as _, Role, Scrub, Sizing, Styled as _, WordSetCx as _, }; use crate::primitives::{TextOptions, TextRun}; -use crate::runtime::env::{Label, LengthUnits, UnitKind, Units}; +use crate::runtime::env::{EnvView, Label, LengthUnits, UnitKind, Units}; use crate::runtime::frame; use crate::style::{ComponentStyle, StyleColor, StyleCx, SurfaceLook, TextLook, TypeRole}; use craft_behavior::nav::{LARGE_STEPS, StepResult, ValueAxes, ValueSteps}; @@ -70,6 +70,36 @@ pub enum StepArrows { Leading, } +/// How a number field sets its value and unit. An app sets it once at its root (`RootEnv::values`); the default is +/// the centred number. +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, crate::runtime::env::EnvValue, crate::contract::MemoProps)] +#[env(style)] +#[non_exhaustive] +pub enum NumberLook { + /// The number centred in the mono face, the unit apart at the end of the value area in caption text, so a column + /// of fields lines its units up; a percentage stands against its sign at the end. + #[default] + Centred, + /// The number and its unit as one run ("720 pt", "0°", "100%") at the field's start, in the interface face and + /// the value's colour: editing shows the same text, and the caret and the selection go through the whole run. + Inline, +} + +/// How many decimals a number field without a codec, fixed or maximum decimals of its own shows. An app sets it once +/// at its root (`RootEnv::values`); the default is the standard precision. +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, crate::runtime::env::EnvValue, crate::contract::MemoProps)] +#[env(style)] +#[non_exhaustive] +pub enum NumberPrecision { + /// A percentage reads one decimal, written in full ("100.0%"); other numbers their unit kind's decimals. + #[default] + Standard, + /// A percentage reads whole ("60%"), and a length field to a thousandth of points, pixels, picas, Q and Ha and a + /// ten-thousandth of the larger units, without trailing zeros ("357.114 pt", "8.2677 in"): a drawing app's + /// positions and sizes. + Measured, +} + /// The placeholder of a mixed field. const BLANK: &str = "\u{2014}"; @@ -190,6 +220,10 @@ pub struct NumberField<'a, V: NumberValue + 'static = Option> { lengths: Option, /// How many shown units make one stored unit, read from the env in measure and parts; 1 for a plain field. scale: f64, + /// The scope's look, read from the env in measure and parts. + look: NumberLook, + /// The scope's precision, read from the env in measure and parts. + precision: NumberPrecision, options: TextOptions, positive_only: bool, scrub: bool, @@ -268,6 +302,8 @@ impl<'a, V: NumberValue + 'static> NumberField<'a, V> { max_decimals: None, lengths: None, scale: 1.0, + look: NumberLook::Centred, + precision: NumberPrecision::Standard, options: TextOptions::default(), positive_only: false, scrub: false, @@ -326,22 +362,60 @@ impl<'a, V: NumberValue + 'static> NumberField<'a, V> { Rule::new(range.as_ref(), self.step) } - /// Reads a length field's scale from stored to shown from the env. - fn settle_lengths(&mut self, units: &Units) { + /// Reads the scope's look and precision and a length field's scale from stored to shown from the env. The status bar's zoom + /// well keeps its own look. + fn settle(&mut self, env: &EnvView<'_>) { + self.look = if self.status_zoom { NumberLook::Centred } else { env.get() }; + self.precision = env.get(); if let Some(lengths) = self.lengths { - self.scale = units.length_scale(lengths).unwrap_or(1.0); + self.scale = env.units().length_scale(lengths).unwrap_or(1.0); } } - /// The unit drawn inside the field after the number: the field's own, else the symbol of its unit kind; none when - /// the host draws it after the field. + /// Whether the field draws its unit inside the box, not the host after the field. + fn unit_inside(&self) -> bool { + !self.status_zoom && self.unit_placement == UnitPlacement::Inside + } + + /// The unit drawn apart inside the field after the number: the field's own, else the symbol of its unit kind; + /// none when the host draws it after the field or the number's run holds it. fn shown_unit(&self, units: &Units) -> Option