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/color-ui/src/ui/mod.rs b/crates/color-ui/src/ui/mod.rs index 58a1ee6bf8..54fb837833 100644 --- a/crates/color-ui/src/ui/mod.rs +++ b/crates/color-ui/src/ui/mod.rs @@ -64,8 +64,8 @@ pub use hud::{ColorHud, ColorHudOutput}; pub use info::{InfoColor, InfoMeasure, InfoPanel, InfoReadings, InfoWords}; pub use lut_picker::{LutChoice, LutPicker, LutPickerOutput, LutWords}; pub use paint_chip::{ - FillKind, GradientPreview, ImagePreview, Paint, PaintChip, PaintChipOutput, PaintEditor, PaintLink, PaintLinkKind, PaintList, PaintListEvent, - PaintListOptions, PaintListOutput, PaintRow, PaintWords, + FillKind, GradientPreview, ImagePreview, Paint, PaintChip, PaintChipOutput, PaintChipSize, PaintEditor, PaintLink, PaintLinkKind, PaintList, + PaintListEvent, PaintListOptions, PaintListOutput, PaintRow, PaintWords, }; pub use pair::{DropAccepts, PairWell, SwatchPair, SwatchPairOutput, Well}; pub use palette::{SwatchPalette, SwatchPaletteOutput}; diff --git a/crates/color-ui/src/ui/paint_chip.rs b/crates/color-ui/src/ui/paint_chip.rs index e6887a0e76..8026cac9d7 100644 --- a/crates/color-ui/src/ui/paint_chip.rs +++ b/crates/color-ui/src/ui/paint_chip.rs @@ -14,12 +14,13 @@ use craft_behavior::{Axis, EditEvent, EditEvents, Metrics, PartKey}; use craft_cms::convert::CmykConverter; use craft_keymap::Mods; use craft_theme::Srgba; -use craft_ui::buttons::Button; +use craft_ui::buttons::{Button, PopupMark}; use craft_ui::choice::{ChoiceWords, RING_SHARE, Segmented, Swatch, SwatchStyle, paint_ring}; use craft_ui::contract::{ Access, Activation, Bind, Common, Component, Cx, DisabledLook, Edit as _, EditResponse, Entry, Meta as _, Outcome, Overlay, OverlayUi, Overlays as _, Pages, PaintUi, PartsCx, Pointer as _, PopupKind, Props as _, Remember as _, Role, Show as _, ShowContainer as _, WordSetCx as _, }; +use craft_ui::controls::disclosure::DisclosureGlyph; use craft_ui::layout_components::Row; use craft_ui::patterns::presets::{DefaultOpen, PresetBrowser, PresetEvent, PresetRowMenu, PresetState}; use craft_ui::primitives::textures::CachedTexture; @@ -39,8 +40,10 @@ pub(crate) mod stories; pub use paint_list::{PaintLink, PaintLinkKind, PaintList, PaintListEvent, PaintListOptions, PaintListOutput, PaintRow}; -/// The chip is this many control heights wide. +/// A regular chip is this many control heights wide. const CHIP_WIDTH_IN_HEIGHTS: f32 = 1.5; +/// A swatch chip's side is a rail button's over this, so three to a row fill a one-column rail's cell. +const SWATCHES_PER_RAIL_BUTTON: f32 = 3.0; /// The most tiles a pattern chip draws; a tile so small that more would fit is drawn as one stretched image. const MAX_TILES: f32 = 4096.0; /// The No Color diagonal stops this many control heights short of the chip's edges. @@ -202,6 +205,21 @@ impl PaintEditor<'_, T> { } } +/// How large a [`PaintChip`] is; every size paints the same well. +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)] +#[non_exhaustive] +pub enum PaintChipSize { + /// A control high and 1.5 times as wide: a panel's or an options bar's chip. + #[default] + Regular, + /// A square well of `size.icon.md` in a slot a control high and `space.gap.item` wider than the well: a chip among + /// a bar's buttons, as a contextual task bar's Fill and Stroke. + Compact, + /// A square a third of `size.rail.button` on a side that opens no popover: a tool rail's Color, Gradient and None, + /// three to a row. + Swatch, +} + /// The style of a paint chip. #[derive(Clone, Debug, PartialEq, ComponentStyle)] #[non_exhaustive] @@ -210,8 +228,10 @@ pub struct PaintChipStyle { metrics: Metrics, #[style(focus)] focus: FocusLook, - /// The chip's height. - height: f32, + /// The well's size. + well: egui::Vec2, + /// The chip's size before the room of its mark: the well's, or for a compact chip the slot round it. + slot: egui::Vec2, /// The chip's corners. radius: egui::CornerRadius, /// The ring on the chip's outline. @@ -222,6 +242,12 @@ pub struct PaintChipStyle { none_mark: StyleColor, /// The swatch look the ring is painted with. swatch: SwatchStyle, + /// The side of the dropdown arrow a chip with [`PopupMark::Menu`] shows after its well. + arrow: f32, + /// The room the arrow takes after the well: the arrow with a tight gap on each side. + arrow_room: f32, + /// The arrow's colour. + arrow_color: StyleColor, } impl PaintChipStyle { @@ -231,7 +257,7 @@ impl PaintChipStyle { none_fill: self.none_fill, none_mark: self.none_mark, edge: self.edge, - height: self.height, + height: self.well.y, radius: self.radius, ring, swatch: self.swatch.clone(), @@ -352,7 +378,8 @@ pub(crate) fn paint_well(ui: &mut PaintUi<'_>, cx: &Cx<'_, impl craft_ui::contra } } -/// A paint chip, a control high and 1.5 times as wide. +/// A paint chip as large as its [`chip_size`](Self::chip_size) (by default a control high and 1.5 times as wide), with the +/// room of its [`popup_mark`](Self::popup_mark) after it. /// /// - Look: a solid paint fills the chip over the checkerboard (alpha shows); a gradient is a /// start-to-end ramp through its stops; No Color is the field fill with a `status.bad` diagonal @@ -400,6 +427,15 @@ pub struct PaintChip<'a> { /// The chip draws as a stroke ring through the one ring painter. #[prop] ring: bool, + /// The mark after the well that tells the chip opens more than it shows: [`PopupMark::Menu`] draws the shared + /// dropdown arrow, inside the chip's hit area. None by default; a chip has no tool group mark, so + /// [`PopupMark::ToolGroup`] draws none. + #[prop] + popup_mark: PopupMark, + /// How large the chip is; [`PaintChipSize::Regular`] by default. + #[style_key] + #[prop] + chip_size: PaintChipSize, /// The request of the Color Picker… button, for this pass. pick_color: Option, /// The modifiers of this pass's click on a chip without a popover. @@ -426,6 +462,8 @@ impl<'a> PaintChip<'a> { full_picker: false, popover: true, ring: false, + popup_mark: PopupMark::None, + chip_size: PaintChipSize::Regular, pick_color: None, clicked: None, } @@ -485,6 +523,24 @@ impl<'a> PaintChip<'a> { self.gradient.as_ref().map(|(default, _)| default) } + /// The room after the well the mark takes: the arrow's for [`PopupMark::Menu`], none otherwise. + fn mark_room(&self, style: &PaintChipStyle) -> f32 { + if self.popup_mark == PopupMark::Menu { style.arrow_room } else { 0.0 } + } + + /// Whether a click opens the popover: on unless [`popover`](Self::popover) is off or the chip is a swatch. + fn opens(&self) -> bool { + self.popover && self.chip_size != PaintChipSize::Swatch + } + + /// The well and the mark's room in the chip's `rect`: a compact chip's well is centred in its slot, every other + /// fills it. + fn layout(&self, rect: Rect, style: &PaintChipStyle, rtl: bool) -> (Rect, Rect) { + let (slot, mark) = split_mark(rect, self.mark_room(style), rtl); + let well = if self.chip_size == PaintChipSize::Compact { Rect::from_center_size(slot.center(), style.well) } else { slot }; + (well, mark) + } + /// The paint a switch to `kind` sets. fn switched(&self, kind: FillKind, solid: Srgba) -> Paint { match kind { @@ -497,6 +553,13 @@ impl<'a> PaintChip<'a> { } } +/// `rect` split into the well and the mark's room, `room` wide at its end edge. +fn split_mark(rect: Rect, room: f32, rtl: bool) -> (Rect, Rect) { + let at = if rtl { rect.left() + room } else { rect.right() - room }; + let (left, right) = (Rect::from_min_max(rect.min, pos2(at, rect.max.y)), Rect::from_min_max(pos2(at, rect.min.y), rect.max)); + if rtl { (right, left) } else { (left, right) } +} + fn kind_label(words: &PaintWords, kind: FillKind) -> Label { match kind { FillKind::None => words.no_color.clone(), @@ -526,18 +589,37 @@ impl Component for PaintChip<'_> { type Style = PaintChipStyle; type Output = PaintChipOutput; - fn style(cx: &StyleCx<'_>, _: PaintChipStyleKey) -> PaintChipStyle { + fn style(cx: &StyleCx<'_>, key: PaintChipStyleKey) -> PaintChipStyle { let colors = &cx.tokens.color; let metrics = craft_ui::choice::SwatchMetrics::of(cx); + let arrow = cx.tokens.size.icon.glyph_sm; + let (well, slot) = match key.chip_size { + PaintChipSize::Regular => { + let well = vec2(metrics.side * CHIP_WIDTH_IN_HEIGHTS, metrics.side); + (well, well) + } + PaintChipSize::Compact => { + let well = egui::Vec2::splat(cx.tokens.size.icon.md); + (well, vec2(well.x + cx.tokens.space.gap.item, metrics.side)) + } + PaintChipSize::Swatch => { + let well = egui::Vec2::splat(cx.tokens.size.rail.button / SWATCHES_PER_RAIL_BUTTON); + (well, well) + } + }; PaintChipStyle { metrics: Metrics::new(), focus: cx.focus_look(), - height: metrics.side, + well, + slot, radius: metrics.radius, edge: cx.color(colors.line.control_edge), none_fill: cx.color(colors.surface.sunken), none_mark: cx.color(colors.status.bad.solid), swatch: Swatch::style(cx, Swatch::new(Label::default(), Srgba::BLACK).style_key()), + arrow, + arrow_room: arrow + 2.0 * cx.tokens.space.gap.tight, + arrow_color: cx.color(colors.text.muted), } } @@ -546,12 +628,13 @@ impl Component for PaintChip<'_> { } fn measure(&mut self, cx: &craft_ui::contract::MeasureCx<'_, Self>) -> egui::Vec2 { - vec2(cx.style.height * CHIP_WIDTH_IN_HEIGHTS, cx.style.height) + cx.style.slot + vec2(self.mark_room(cx.style), 0.0) } fn parts(&mut self, rect: egui::Rect, cx: &mut PartsCx<'_, Self>) { - let part = cx.part(WELL, rect); - if self.popover { + let (well, _) = self.layout(rect, cx.style, cx.flow.is_rtl()); + let part = cx.part(WELL, well); + if self.opens() { let _ = part.toggles("picker"); } } @@ -567,7 +650,7 @@ impl Component for PaintChip<'_> { cx.memory::().0 = Some(color); } let activation = cx.activation().filter(|_: &Activation| cx.resolved.enabled); - if !self.popover { + if !self.opens() { self.clicked = activation.map(|activation| activation.mods); return; } @@ -583,7 +666,7 @@ impl Component for PaintChip<'_> { } fn overlay(&mut self, ui: &mut OverlayUi<'_>, cx: &mut Cx<'_, Self>) { - if !self.popover { + if !self.opens() { return; } let popup = cx.popup("picker"); @@ -694,17 +777,23 @@ impl Component for PaintChip<'_> { Some(paint) => access.value(value_text(&words, paint)), None => access.value(cx.words::().swatch_mixed.as_str()), }; - if self.popover { + if self.opens() { access.has_popup(PopupKind::Dialog); } } fn paint(&mut self, ui: &mut PaintUi<'_>, cx: &Cx<'_, Self>) { + let (well, mark) = self.layout(cx.rect, &cx.style, cx.flow.is_rtl()); + if self.popup_mark == PopupMark::Menu { + let mut arrow = DisclosureGlyph::dropdown_of(cx.env.get()); + arrow.color = Some(cx.style.arrow_color); + ui.draw().icon(Rect::from_center_size(mark.center(), vec2(cx.style.arrow, cx.style.arrow)), &arrow); + } let Some(paint) = cx.value().cloned() else { ui.face(WELL, Swatch::new(cx.resolved.label.to_owned(), Mixed::::Mixed)); return; }; - paint_well(ui, cx, cx.rect, &paint, &cx.style.well_look(self.ring)); + paint_well(ui, cx, well, &paint, &cx.style.well_look(self.ring)); } fn finish(self, cx: Cx<'_, Self>) -> PaintChipOutput { diff --git a/crates/color-ui/src/ui/paint_chip/stories.rs b/crates/color-ui/src/ui/paint_chip/stories.rs index 3d2c3100d7..ca6748ed04 100644 --- a/crates/color-ui/src/ui/paint_chip/stories.rs +++ b/crates/color-ui/src/ui/paint_chip/stories.rs @@ -1,12 +1,13 @@ //! Stories of the paint chip and the paint list. -use super::{GradientPreview, ImagePreview, Paint, PaintChip, PaintLink, PaintLinkKind, PaintList, PaintListOptions, PaintRow}; +use super::{GradientPreview, ImagePreview, Paint, PaintChip, PaintChipSize, PaintLink, PaintLinkKind, PaintList, PaintListOptions, PaintRow}; use craft_behavior::Mixed; use craft_theme::Srgba; +use craft_ui::buttons::PopupMark; use craft_ui::contract::Role; use craft_ui::contract::{Bind, Props as _, Show as _, ShowContainer as _, Validity}; use craft_ui::display::{Shade, Text}; -use craft_ui::layout_components::Stack; +use craft_ui::layout_components::{Row, Stack}; use craft_ui::patterns::presets::PresetState; use craft_ui::primitives::FacePaint; use craft_ui::runtime::env::Message; @@ -89,6 +90,55 @@ fn paint_chip_ring(ui: &mut Ui, data: &mut StoryData) -> StoryOutput { first.unwrap_or_default() } +/// Fill and Stroke chips with the menu mark: the dropdown arrow after the well, inside the chip. +#[story(PaintChip<'static>, covers = [], drive = Drive::Never)] +fn paint_chip_menu_mark(ui: &mut Ui, data: &mut StoryData) -> StoryOutput { + let paints = data.value("paints", [Paint::Solid(BLUE), Paint::Solid(Srgba::rgb(0.1, 0.1, 0.1))]); + let mut first = None; + Stack::new().show(ui, |ui, _| { + for (index, (label, paint)) in ["Fill", "Stroke"].into_iter().zip(paints.iter_mut()).enumerate() { + let shown = PaintChip::new(label, Bind::bound(paint), BLUE).ring(index == 1).popup_mark(PopupMark::Menu).show(ui); + if index == 0 { + first = Some(StoryOutput::from(shown)); + } + } + }); + first.unwrap_or_default() +} + +/// Compact Fill and Stroke chips in a row, as among a task bar's buttons: a small well in a control-high slot. +#[story(PaintChip<'static>, covers = [], drive = Drive::Never)] +fn paint_chip_compact(ui: &mut Ui, data: &mut StoryData) -> StoryOutput { + let paints = data.value("paints", [Paint::Solid(BLUE), Paint::Solid(Srgba::rgb(0.1, 0.1, 0.1))]); + let mut first = None; + Row::new().show(ui, |ui, _| { + for (index, (label, paint)) in ["Fill", "Stroke"].into_iter().zip(paints.iter_mut()).enumerate() { + let shown = PaintChip::new(label, Bind::bound(paint), BLUE).ring(index == 1).chip_size(PaintChipSize::Compact).popover(false).show(ui); + if index == 0 { + first = Some(StoryOutput::from(shown)); + } + } + }); + first.unwrap_or_default() +} + +/// A tool rail's Color, Gradient and None as swatch chips, three in a row; a click opens nothing. +#[story(PaintChip<'static>, covers = [], drive = Drive::Never)] +fn paint_chip_swatches(ui: &mut Ui, data: &mut StoryData) -> StoryOutput { + let gradient = GradientPreview::new(vec![(0.0, Srgba::rgb(1.0, 1.0, 1.0)), (1.0, Srgba::rgb(0.0, 0.0, 0.0))]); + let paints = data.value("paints", [Paint::Solid(BLUE), Paint::Gradient(gradient), Paint::None]); + let mut first = None; + Row::new().show(ui, |ui, _| { + for (index, (label, paint)) in ["Color", "Gradient", "None"].into_iter().zip(paints.iter_mut()).enumerate() { + let shown = PaintChip::new(label, Bind::bound(paint), BLUE).chip_size(PaintChipSize::Swatch).show(ui); + if index == 0 { + first = Some(StoryOutput::from(shown)); + } + } + }); + first.unwrap_or_default() +} + /// A gradient whose face is the host's painter: one coloured rect over the checker. #[story(PaintChip<'static>, covers = [], drive = Drive::Never)] fn paint_chip_gradient_face(ui: &mut Ui, data: &mut StoryData) -> StoryOutput { diff --git a/crates/color-ui/tests/it/main.rs b/crates/color-ui/tests/it/main.rs index 1e2a783449..dfe187fd0e 100644 --- a/crates/color-ui/tests/it/main.rs +++ b/crates/color-ui/tests/it/main.rs @@ -3,6 +3,7 @@ pub(crate) mod area_gamut; pub(crate) mod color_parts; pub(crate) mod gradient_bar; +pub(crate) mod paint_chip; pub(crate) mod paint_list; pub(crate) mod pair; pub(crate) mod panels; diff --git a/crates/color-ui/tests/it/paint_chip.rs b/crates/color-ui/tests/it/paint_chip.rs new file mode 100644 index 0000000000..ace5e86685 --- /dev/null +++ b/crates/color-ui/tests/it/paint_chip.rs @@ -0,0 +1,40 @@ +//! `PaintChip`'s menu mark, the arrow after the well that is part of the chip, and its swatch size. + +use craft_color_ui::ui::{Paint, PaintChip, PaintChipSize}; +use craft_theme::Srgba; +use craft_ui::buttons::PopupMark; +use craft_ui::contract::{Bind, Role, Show as _}; +use craft_ui::testing::{Fixture, trial}; +use std::cell::Cell; +use std::rc::Rc; + +/// A click on the menu mark, past the well, opens the chip's popover, as a click on the well does. +#[trial] +fn a_click_on_the_menu_mark_opens_the_popover() { + let mut fixture = Fixture::new(|ui| { + let mut paint = Paint::Solid(Srgba::rgb(0.2, 0.4, 0.8)); + let _ = PaintChip::new("Fill", Bind::bound(&mut paint), Srgba::BLACK).popup_mark(PopupMark::Menu).show(ui); + }); + fixture.settle(); + let chip = fixture.by_role(Role::COLOR_WELL).first().copied().expect("the chip is a colour well"); + // The mark's room is at the chip's end edge, past the well. + fixture.click_at(egui::pos2(chip.rect.right() - 2.0, chip.rect.center().y)).idle(4); + assert!(!fixture.by_role(Role::RADIO_BUTTON).is_empty(), "the popover's kind switch shows"); +} + +/// A swatch chip opens no popover: a click reports its modifiers for the host's command. +#[trial] +fn a_click_on_a_swatch_chip_opens_nothing_and_reports_the_click() { + let clicked = Rc::new(Cell::new(false)); + let seen = Rc::clone(&clicked); + let mut fixture = Fixture::new(move |ui| { + let mut paint = Paint::None; + let out = PaintChip::new("None", Bind::bound(&mut paint), Srgba::BLACK).chip_size(PaintChipSize::Swatch).show(ui); + seen.set(seen.get() || out.clicked.is_some()); + }); + fixture.settle(); + let chip = fixture.by_role(Role::COLOR_WELL).first().copied().expect("the chip is a colour well"); + fixture.click(&chip).idle(4); + assert!(clicked.get(), "the click is reported"); + assert!(fixture.by_role(Role::RADIO_BUTTON).is_empty(), "no popover opens"); +} diff --git a/crates/draw/src/ui/artboard/properties.rs b/crates/draw/src/ui/artboard/properties.rs index 3951d5e6b9..aa3521991e 100644 --- a/crates/draw/src/ui/artboard/properties.rs +++ b/crates/draw/src/ui/artboard/properties.rs @@ -87,7 +87,7 @@ impl<'a> ArtboardProperties<'a> { }); // A glyph-labelled number field; the pairs share a row, as W and H in the shape panel. let field = |ui: &mut Ui, glyph: &Label, name: &Label, value: f64, range: &RangeInclusive| { - let side = SideLabel::new().kind(LabelKind::Glyph(GlyphLabel::text(glyph.clone()))).scrub(true); + let side = SideLabel::new().kind(LabelKind::Glyph(GlyphLabel::caption(glyph.clone()))).scrub(true); Field::new(name.clone()) .side(side) .show(ui, |ui, _| { diff --git a/crates/draw/src/ui/shape/panel.rs b/crates/draw/src/ui/shape/panel.rs index c0fadd96e2..7dbd80260f 100644 --- a/crates/draw/src/ui/shape/panel.rs +++ b/crates/draw/src/ui/shape/panel.rs @@ -527,7 +527,7 @@ impl<'p, 'a> Cells<'p, 'a> { /// The side label of a cell shown by a short glyph (W, H) instead of its caption, which scrubs it. pub(super) fn glyph_side(glyph: &Label) -> SideLabel { - SideLabel::new().kind(LabelKind::Glyph(GlyphLabel::text(glyph.clone()))).scrub(true) + SideLabel::new().kind(LabelKind::Glyph(GlyphLabel::caption(glyph.clone()))).scrub(true) } /// The change a Sides value makes: a whole number of sides in range. diff --git a/crates/draw/src/ui/transform/transform_fields.rs b/crates/draw/src/ui/transform/transform_fields.rs index b792fe9409..cfc007bbfa 100644 --- a/crates/draw/src/ui/transform/transform_fields.rs +++ b/crates/draw/src/ui/transform/transform_fields.rs @@ -503,7 +503,7 @@ impl Cells<'_> { /// inside the field. fn side_and_name(&self, field: TransformField, form: Form) -> (SideLabel, Label) { let words = &self.words; - let beside = |glyph: &Label| SideLabel::new().kind(LabelKind::Glyph(GlyphLabel::text(glyph.clone()))); + let beside = |glyph: &Label| SideLabel::new().kind(LabelKind::Glyph(GlyphLabel::caption(glyph.clone()))); let (side, name) = match field { TransformField::X => (beside(&words.x_glyph), &words.x_name), TransformField::Y => (beside(&words.y_glyph), &words.y_name), 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/src/canvas_controls/mod.rs b/crates/ui-canvas/src/canvas_controls/mod.rs index 58d1094cb5..732817ba20 100644 --- a/crates/ui-canvas/src/canvas_controls/mod.rs +++ b/crates/ui-canvas/src/canvas_controls/mod.rs @@ -27,7 +27,7 @@ pub use line_preview::{LineGuideStyle, StraightLinePreview}; pub use marquee::{Marquee, MarqueeLook, MarqueeShape, MarqueeStyle, Run}; pub use outline::{HoverMask, HoverOutline, HoverShape, OutlineStyle, SelectionOutline, SelectionOutlineLook, path_runs}; pub use pixel_grid::{GridSegment, PixelGrid, PixelGridStyle}; -pub use task_bar::{TaskBar, TaskBarCx, TaskBarDismiss, TaskBarKind, TaskBarOutput, TaskBarPlace}; +pub use task_bar::{TaskBar, TaskBarCx, TaskBarDismiss, TaskBarGrip, TaskBarHang, TaskBarKind, TaskBarOutput, TaskBarPlace}; // End of canvas-controls-b. // Brush overlays. diff --git a/crates/ui-canvas/src/canvas_controls/task_bar.rs b/crates/ui-canvas/src/canvas_controls/task_bar.rs index 81e96c0b4c..669d2136dc 100644 --- a/crates/ui-canvas/src/canvas_controls/task_bar.rs +++ b/crates/ui-canvas/src/canvas_controls/task_bar.rs @@ -10,18 +10,19 @@ use crate::buttons::IconButton; use crate::canvas::canvas_space; use crate::contract::overlay::{Anchor, Dismiss, Outside, Place, PlacementChange, PlacementKind}; use crate::contract::{ - Bind, BindMut, Common, Component, Container, ContainerProps, Cx, DragBand, HeaderRegion, Inner, Mount, NoValue, Outcome, Overlay, Pad, PopupKind, - Props as _, Role, Show as _, ShowContainer as _, Sizing, Trigger, + Bind, BindMut, Common, Component, Container, ContainerProps, Cx, DragBand, Gap, HeaderRegion, Inner, MeasureCx, Mount, NoValue, Outcome, Overlay, + Pad, PaintUi, PopupKind, Props as _, Role, Show as _, ShowContainer as _, Sizing, Styled as _, Trigger, }; use crate::display::{Divider, Icon}; use crate::menu::{Menu, MenuItem, PanelMenu, PanelRow}; -use crate::primitives::IconSpec; +use crate::primitives::{IconSpec, PaintShape}; use crate::runtime::env::{Env, Label}; use crate::runtime::overlay::CloseReason; -use crate::style::{ComponentStyle, StyleCx, SurfaceKind}; +use crate::style::{ComponentStyle, StyleColor, StyleCx, SurfaceKind, UiTokens}; use craft_behavior::kurbo::Point; use craft_behavior::overlay::{Align, PlaceRequest, Side}; use craft_behavior::{EditEvent, GesturePhase, IconId, Metrics, Mixed, Sense}; +use craft_theme::{Stateful, States}; use egui::{Pos2, Rect, Response, Ui, Vec2}; use std::sync::Arc; @@ -67,10 +68,10 @@ impl TaskBarPlace { /// members and a More menu (Hide, Pin, Reset, then the host's rows). One place, pin and Hide setting for Crop and /// Frame. /// -/// - Place: on `side` of the anchor's bounds on screen (below, centred, by default), a section gap away, following the -/// anchor each pass; it flips to the other side when there is no room. Dragged by its grip (any free point of the -/// bar), it keeps its offset from that place while the anchor moves or the bar grows; a press with no drag changes -/// nothing. A moved bar whose offset place would cover the `keep_clear` point shows at its unmoved place and keeps +/// - Place: on `side` of the anchor's bounds on screen (below, centred, by default), a section gap away (or as far as +/// [`hang_gap`](Self::hang_gap) says), following the anchor each pass; it flips to the other side when there is no +/// room. Dragged by its grip (any free point of the bar), it keeps its offset from that place while the anchor moves +/// or the bar grows; a press with no drag changes nothing. A moved bar whose offset place would cover the `keep_clear` point shows at its unmoved place and keeps /// its offset. Pinned, it stays where it shows. /// - Area: the bar shows inside `area` (the canvas rect): a move stays inside it, and a stored place outside it comes /// back inside, its left and top edges winning where the bar does not fit. Its members continue on a new line when @@ -112,6 +113,16 @@ pub struct TaskBar<'a> { /// default. #[prop] compact: bool, + /// How the task bar's grip looks: the `grip` icon by default. + #[prop] + grip: TaskBarGrip, + /// The space between the bar's members, in place of the tool bar's tight gap: `Gap::Item` sets them a control gap + /// apart. + #[prop(into)] + member_gap: Option, + /// How far from its anchor's bounds a bar hung from document points hangs: a section gap by default. + #[prop] + hang_gap: TaskBarHang, } /// What a bar hangs from: the screen bounds of document points, or the canvas view's top edge, aligned in reading @@ -136,6 +147,30 @@ pub enum TaskBarKind { Fixed, } +/// How the grip of a [`TaskBar`] looks. Either way the grip takes no press of its own: the bar's move band under it +/// moves the bar. +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] +#[non_exhaustive] +pub enum TaskBarGrip { + /// The `grip` icon. + #[default] + Icon, + /// One rounded upright bar, a value track's groove wide and the members' line less a row gap at each end tall, in + /// the control edge's line colour; muted text under the pointer and while the bar moves (VectorCraft's). + Bar, +} + +/// How far from its anchor's bounds a [`TaskBar`] hangs. +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] +#[non_exhaustive] +pub enum TaskBarHang { + /// A section gap away. + #[default] + Gap, + /// The handle ring and a section gap away: clear of a selection's handles on that side and their hit area. + ClearOfHandles, +} + /// What an outside press does to a [`TaskBar`]. #[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] #[non_exhaustive] @@ -257,6 +292,9 @@ impl<'a> TaskBar<'a> { keep_clear: None, dismiss: TaskBarDismiss::Close, compact: false, + grip: TaskBarGrip::Icon, + member_gap: None, + hang_gap: TaskBarHang::Gap, } } @@ -283,6 +321,9 @@ impl<'a> TaskBar<'a> { keep_clear: None, dismiss: TaskBarDismiss::Close, compact: false, + grip: TaskBarGrip::Icon, + member_gap: None, + hang_gap: TaskBarHang::Gap, } } @@ -311,7 +352,7 @@ impl<'a> TaskBar<'a> { /// Shows the bar inside `area`; `body` fills its members. pub fn show(self, ui: &mut Ui, area: Rect, mut body: impl FnMut(&mut Ui, &mut TaskBarCx<'_>) -> R) -> Inner { - let TaskBar { label, hang, mut place, rows, kind, side, align, keep_clear, dismiss, compact } = self; + let TaskBar { label, hang, mut place, rows, kind, side, align, keep_clear, dismiss, compact, grip: grip_look, member_gap, hang_gap } = self; let side = side.unwrap_or(match kind { TaskBarKind::Task | TaskBarKind::Fixed => Side::Below, TaskBarKind::Selection => Side::Above, @@ -329,7 +370,8 @@ impl<'a> TaskBar<'a> { bounds.extend_with(at); bounds }); - let gap = env.tokens.space.gap.section; + let clear = if hang_gap == TaskBarHang::ClearOfHandles { env.tokens.size.handle.ring } else { 0.0 }; + let gap = env.tokens.space.gap.section + clear; // A fixed bar keeps the gap on both sides of its anchor: it opens above when there is no room below. let rect = if kind == TaskBarKind::Fixed { bounds.expand2(Vec2::new(0.0, gap)) } else { hang_rect(bounds, gap, side) }; (room && bounds.is_finite()).then(|| Hung { @@ -357,14 +399,25 @@ impl<'a> TaskBar<'a> { let mut menu = MoreMenu { words: Arc::clone(&words), offered: movable, pinned: held.pinned, rows, placed: false, pick: None }; // Only the task bar moves, so only it starts with the grip. let grip = movable.then(|| words.task_bar_move.clone()); - let mut shown = layer.show(ui, |ui, _| { + let mut shown = layer.show(ui, |ui, layer| { + let moving = layer.moving(); // The bar is the one surface: the grip is its first member, on the members' line inside its padding. let bar = Bar::new(Label::Empty, BarKind::Tool).surface(SurfaceKind::Floating).wrap(); // A compact bar takes a popup's smaller corners and lighter shadow, as production's small frame. let bar = if compact { bar.compact().surface(SurfaceKind::Popup) } else { bar }; + let bar = match member_gap { + Some(gap) => bar.gap(gap), + None => bar, + }; bar.show(ui, |ui, _| { - if let Some(grip) = &grip { - let _ = Icon::new(IconSpec::svg(IconId::new("grip"))).label(grip.clone()).show(ui); + match (&grip, grip_look) { + (Some(grip), TaskBarGrip::Bar) => { + let _ = GripBar { common: Common::new(), moving }.label(grip.clone()).show(ui); + } + (Some(grip), _) => { + let _ = Icon::new(IconSpec::svg(IconId::new("grip"))).label(grip.clone()).show(ui); + } + (None, _) => {} } menu.placed = false; let inner = body(ui, &mut TaskBarCx { menu: &mut menu }); @@ -498,6 +551,70 @@ fn settled(held: TaskBarPlace, shown: Rect, area: Rect, moved: Option, pic next } +/// The style of the [`TaskBarGrip::Bar`] grip. +#[derive(Clone, Debug, PartialEq, ComponentStyle)] +#[non_exhaustive] +pub struct GripBarStyle { + #[style(metrics)] + metrics: Metrics, + /// The bar's width and height. + size: Vec2, + /// The bar's ink: the line colour at rest, muted text under the pointer. + ink: Stateful, + /// The ink while the bar moves. + moving: StyleColor, +} + +/// The [`TaskBarGrip::Bar`] grip: one rounded upright bar centred on the members' line. It senses only hover, so a +/// press on it reaches the layer's move band under it. +#[derive(crate::contract::Component, crate::contract::Props)] +#[component(unregistered)] +struct GripBar { + #[common] + common: Common, + /// The layer's move band is moving the bar this pass. + moving: bool, +} + +impl Component for GripBar { + const ROLE: Role = Role::IMAGE; + const PARTS: bool = false; + const INPUT: craft_behavior::Input = craft_behavior::Input::Display; + const SHOWS_LABEL: bool = false; + const OVERLAYS: bool = false; + type Style = GripBarStyle; + type Output = Response; + + fn style(cx: &StyleCx<'_>, _: GripBarStyleKey) -> GripBarStyle { + let colors = &cx.tokens.color; + let (rest, lit) = (cx.color(colors.line.control_edge), cx.color(colors.text.muted)); + GripBarStyle { + metrics: Metrics::new(), + size: Vec2::new(cx.tokens.size.groove, cx.control().height - 2.0 * cx.tokens.space.gap.row), + ink: Stateful::new(rest).off(States::new(rest, lit, lit, rest)), + moving: lit, + } + } + + fn measure(&mut self, cx: &MeasureCx<'_, Self>) -> Vec2 { + cx.style.size + } + + fn sense(&self) -> Sense { + Sense::HOVER + } + + fn paint(&mut self, ui: &mut PaintUi<'_>, cx: &Cx<'_, Self>) { + let ink = if self.moving { cx.style.moving } else { cx.resolve(&cx.style.ink) }; + let bar = Rect::from_center_size(cx.rect.center(), cx.style.size); + ui.draw().fill(&PaintShape::Rect(bar, UiTokens::corner(cx.style.size.x / 2.0)), ink); + } + + fn finish(self, cx: Cx<'_, Self>) -> Response { + cx.response.clone() + } +} + /// The style of the task bar's layer: the surface comes from the container. #[derive(Clone, Debug, Default, PartialEq, ComponentStyle)] #[non_exhaustive] diff --git a/crates/ui-canvas/src/canvas_controls/task_bar/stories.rs b/crates/ui-canvas/src/canvas_controls/task_bar/stories.rs index 9d357c830c..0f9e0c80dc 100644 --- a/crates/ui-canvas/src/canvas_controls/task_bar/stories.rs +++ b/crates/ui-canvas/src/canvas_controls/task_bar/stories.rs @@ -1,9 +1,9 @@ //! Stories of `TaskBar`. -use super::{TaskBar, TaskBarDismiss, TaskBarPlace}; +use super::{TaskBar, TaskBarDismiss, TaskBarGrip, TaskBarHang, TaskBarPlace}; use crate::buttons::{Button, IconButton}; use crate::canvas::testing::canvas_story::{StoryDocument, on_canvas}; -use crate::contract::{Props as _, Show as _}; +use crate::contract::{Gap, Props as _, Show as _}; use crate::menu::PanelRow; use crate::runtime::commands::{CommandRef, EditCommands}; use crate::testing::{Drive, Fixture, StoryData, StoryOutput, story}; @@ -198,3 +198,48 @@ fn placed_and_pinned(ui: &mut Ui, data: &mut StoryData) -> StoryOutput { .output }) } + +/// Points the pointer at the grip. +fn hover_grip(fixture: &mut Fixture) { + if let Some(grip) = fixture.by_label("Move bar") { + fixture.frame(vec![crate::testing::pointer::moved(grip.center())]); + fixture.idle(8); + } +} + +/// Drags the bar by its grip and holds it there, the button down. +fn drag_grip(fixture: &mut Fixture) { + if let Some(grip) = fixture.by_label("Move bar") { + fixture.drag_hold_at(grip.center(), egui::vec2(-40.0, 30.0)); + } +} + +/// The bar grip: one rounded upright bar in the line colour. +#[story(TaskBar<'static>, covers = [], drive = Drive::Never)] +fn bar_grip(ui: &mut Ui, data: &mut StoryData) -> StoryOutput { + configured(ui, data, &turned_frame(), None, |bar| bar.grip(TaskBarGrip::Bar)) +} + +/// The bar grip under the pointer: muted text. +#[story(TaskBar<'static>, covers = [], drive = Drive::Custom(hover_grip))] +fn bar_grip_hovered(ui: &mut Ui, data: &mut StoryData) -> StoryOutput { + configured(ui, data, &turned_frame(), None, |bar| bar.grip(TaskBarGrip::Bar)) +} + +/// The bar grip while the bar moves: muted text. +#[story(TaskBar<'static>, covers = [], drive = Drive::Custom(drag_grip))] +fn bar_grip_dragged(ui: &mut Ui, data: &mut StoryData) -> StoryOutput { + configured(ui, data, &turned_frame(), None, |bar| bar.grip(TaskBarGrip::Bar)) +} + +/// A bar whose members stand a control gap apart. +#[story(TaskBar<'static>, covers = [], drive = Drive::Never)] +fn control_gap(ui: &mut Ui, data: &mut StoryData) -> StoryOutput { + configured(ui, data, &turned_frame(), None, |bar| bar.member_gap(Gap::Item)) +} + +/// A bar hung clear of the frame's handles: the handle ring and a section gap below it. +#[story(TaskBar<'static>, covers = [], drive = Drive::Never)] +fn clear_of_handles(ui: &mut Ui, data: &mut StoryData) -> StoryOutput { + configured(ui, data, &turned_frame(), None, |bar| bar.hang_gap(TaskBarHang::ClearOfHandles)) +} 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-canvas/tests/it/canvas_controls/task_bar.rs b/crates/ui-canvas/tests/it/canvas_controls/task_bar.rs index 74405a0917..6aa85685b2 100644 --- a/crates/ui-canvas/tests/it/canvas_controls/task_bar.rs +++ b/crates/ui-canvas/tests/it/canvas_controls/task_bar.rs @@ -6,7 +6,7 @@ use craft_behavior::CanvasView; use craft_behavior::kurbo::{Point, Vec2 as DocVec}; use craft_behavior::overlay::{Align, Side}; use craft_ui::buttons::Button; -use craft_ui::canvas_controls::{TaskBar, TaskBarDismiss, TaskBarPlace}; +use craft_ui::canvas_controls::{TaskBar, TaskBarDismiss, TaskBarGrip, TaskBarHang, TaskBarPlace}; use craft_ui::contract::{Bind, Show as _}; use craft_ui::menu::PanelRow; use craft_ui::runtime::commands::{CommandRef, EditCommands}; @@ -523,3 +523,49 @@ fn a_compact_task_bar_is_smaller_and_shows_every_member_whole() { assert!(button.is_positive() && compact.expand(SLACK).contains_rect(button), "each member shows whole in {compact:?}: {button:?}"); } } + +/// The fill of the bar grip painted inside `grip` among `shapes`. +fn grip_ink(shapes: &[egui::Shape], grip: Rect) -> Option { + shapes.iter().find_map(|shape| match shape { + egui::Shape::Rect(rect) if grip.contains_rect(rect.rect) => Some(rect.fill), + _ => None, + }) +} + +/// The bar grip lights under the pointer and while the bar moves, and goes back to its rest ink after the drop. +#[trial] +fn the_bar_grip_lights_under_the_pointer_and_while_the_bar_moves() { + let scene = scene(); + let mut fixture = fixture_with(&scene, |bar| bar.grip(TaskBarGrip::Bar)); + fixture.settle(); + let grip = fixture.by_label("Move bar").expect("the grip is named"); + let rest = grip_ink(&fixture.frame_shapes(), grip.rect).expect("the grip paints its bar"); + + fixture.frame(vec![moved(grip.center())]).idle(8); + let hovered = grip_ink(&fixture.frame_shapes(), grip.rect); + assert!(hovered.is_some_and(|ink| ink != rest), "the grip lights under the pointer: {hovered:?} against {rest:?}"); + + let by = Vec2::new(-60.0, 30.0); + fixture.drag_hold_at(grip.center(), by); + let moving = grip_ink(&fixture.frame_shapes(), grip.rect.translate(by)); + assert!(moving.is_some_and(|ink| ink != rest), "the grip is lit while the bar moves: {moving:?} against {rest:?}"); + + fixture.release_at(grip.center() + by).frame(vec![moved(grip.center() + by + Vec2::new(0.0, 200.0))]).idle(8); + let dropped = fixture.by_label("Move bar").expect("the grip is named"); + assert_eq!(grip_ink(&fixture.frame_shapes(), dropped.rect), Some(rest), "the grip is back to rest once dropped and left"); +} + +/// A bar hung clear of the handles hangs farther below its anchor than the default, by the handle ring at least. +#[trial] +fn a_bar_clear_of_the_handles_hangs_farther_below_its_anchor() { + let below = |configure: fn(TaskBar<'_>) -> TaskBar<'_>| { + let scene = scene(); + let mut fixture = fixture_with(&scene, configure); + fixture.settle(); + let seen = seen(&scene); + seen.rect.top() - seen.bounds.bottom() + }; + let (default, clear) = (below(|bar| bar), below(|bar| bar.hang_gap(TaskBarHang::ClearOfHandles))); + assert!(default > 0.0, "the bar hangs below its anchor: {default}"); + assert!(clear > default + 2.0 * SLACK, "the bar clear of the handles hangs farther below: {clear} against {default}"); +} diff --git a/crates/ui-contract/src/contract/cx/body.rs b/crates/ui-contract/src/contract/cx/body.rs index ac8624c33b..4705042554 100644 --- a/crates/ui-contract/src/contract/cx/body.rs +++ b/crates/ui-contract/src/contract/cx/body.rs @@ -84,6 +84,13 @@ impl<'a> BodyCx<'a> { self.field_message.clone() } + /// Whether a drag of the container's move band (`DragBand::Move`) moves its layer in this pass, from the pass the + /// drag starts to the one before its release: a grip in the body shows the move. + pub fn moving(&self) -> bool { + let band = crate::primitives::sensing::part_press(self.memory.ctx(), self.resolved.id, crate::contract::MOVE_BAND.into()); + matches!(band.press.phase, craft_behavior::PressPhase::DragStart { .. } | craft_behavior::PressPhase::Drag { .. }) + } + /// Whether the body is open. pub fn is_open(&self) -> bool { *self.open diff --git a/crates/ui-contract/src/contract/label.rs b/crates/ui-contract/src/contract/label.rs index b10a44bcbf..49da6126c2 100644 --- a/crates/ui-contract/src/contract/label.rs +++ b/crates/ui-contract/src/contract/label.rs @@ -13,5 +13,5 @@ mod step; pub use leaf::colon_of; pub(crate) use place::{control_after, label_gap}; pub(crate) use props::inside; -pub use props::{CaptionColumn, CellWidth, FieldLayout, GlyphLabel, InsideLabel, LabelKind, LabelPress, LabelScheme, Scrub, SideLabel}; +pub use props::{CaptionColumn, CellWidth, FieldLayout, GlyphColon, GlyphLabel, InsideLabel, LabelKind, LabelPress, LabelScheme, Scrub, SideLabel}; pub(crate) use step::{LabelIn, LeafLabel, Trailing, flow_leaf, in_column, leaf, leaf_under, report_after_reach, run, show_leaf_in_flow}; diff --git a/crates/ui-contract/src/contract/label/leaf.rs b/crates/ui-contract/src/contract/label/leaf.rs index 671948bf99..3268419fb8 100644 --- a/crates/ui-contract/src/contract/label/leaf.rs +++ b/crates/ui-contract/src/contract/label/leaf.rs @@ -1,6 +1,6 @@ //! The side label as a leaf component: its node, press state, reset dot and colon. -use super::props::{FieldLayout, Glyph, LabelKind, LabelScheme}; +use super::props::{FieldLayout, Glyph, GlyphColon, LabelKind, LabelScheme}; use super::step::LabelIn; use crate::contract::InBar; use crate::contract::{Component, Props}; @@ -411,18 +411,20 @@ impl Component for LabelLeaf { } /// The colon a beside label draws after its shown text in a form (`LabelScheme::Form`), unless that text ends in one: -/// a text label's, and in a bar a glyph text's as well ("X:"). An inspector's labels draw none. The label's node and -/// the control keep the name as given. +/// a text label's, in a bar a glyph text's as well ("X:"), and under `GlyphColon::Form` a glyph caption's. An +/// inspector's labels draw none. The label's node and the control keep the name as given. pub(super) fn colon(env: &Env, input: &LabelIn<'_>) -> Option { if input.side.layout != FieldLayout::Beside || env.values.get::() == LabelScheme::Inspector { return None; } let text = match &input.side.kind { LabelKind::Text | LabelKind::Short(_) => env.view().resolve(input.side.kind.shown(input.text)), - LabelKind::Glyph(glyph) if env.values.get::().0 => match glyph.resolved(env.view()) { - Glyph::Text(text) => text, - Glyph::Icon(_) => return None, - }, + LabelKind::Glyph(glyph) if env.values.get::().0 || (glyph.caption && env.values.get::() == GlyphColon::Form) => { + match glyph.resolved(env.view()) { + Glyph::Text(text) => text, + Glyph::Icon(_) => return None, + } + } _ => return None, }; if text.as_str().is_empty() || text.as_str().ends_with([':', '\u{ff1a}']) { diff --git a/crates/ui-contract/src/contract/label/props.rs b/crates/ui-contract/src/contract/label/props.rs index 07d50ddcce..01fd5e9c43 100644 --- a/crates/ui-contract/src/contract/label/props.rs +++ b/crates/ui-contract/src/contract/label/props.rs @@ -48,17 +48,26 @@ pub(super) enum Glyph { #[derive(Clone, Debug, PartialEq)] pub struct GlyphLabel { shown: Glyph, + /// The text stands for a word caption ([`GlyphLabel::caption`]). + pub(super) caption: bool, } impl GlyphLabel { /// Shows `icon`, as large as the control's icons. pub fn icon(icon: impl Into>) -> Self { - GlyphLabel { shown: Glyph::Icon(icon.into()) } + GlyphLabel { shown: Glyph::Icon(icon.into()), caption: false } } /// Shows `text`, resolved in the scope's language. pub fn text(text: impl Into