From 3b36acc52bb005fd0b60e216ac3849af834a93f2 Mon Sep 17 00:00:00 2001 From: Martin Ball Date: Wed, 25 Nov 2026 10:32:25 +0000 Subject: [PATCH] menu gallery: the current tile's outline is accent.solid, not the translucent accent.border Several themes pin accent.border translucent so it reads on a control's own fill (Adwaita, Breeze, Soft, Studio, Solarized Dark). The current tile has no fill now, so that outline sat at 1.6 to 2.6:1 on the ribbon, under the 3:1 a state mark needs. accent.solid is what the other selection outlines take (table cells, graph nodes, timeline clips). Also drops the tile style's stale note about a selection fill. Co-Authored-By: Claude Opus 5.5 --- crates/menu/src/ribbon/gallery.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/menu/src/ribbon/gallery.rs b/crates/menu/src/ribbon/gallery.rs index 33515f33b4..51a4fde5b9 100644 --- a/crates/menu/src/ribbon/gallery.rs +++ b/crates/menu/src/ribbon/gallery.rs @@ -356,7 +356,7 @@ fn grid(ui: &mut Ui, label: &Label, items: &[GalleryItem<'_, K>], current: Op // --------------------------------------------------------------------------------------------------------------- // The tile. -/// The style of a gallery tile: the theme's selection fill and edge while it is the current one. +/// The style of a gallery tile: the accent outline while it is the current one. #[derive(Clone, Debug, PartialEq, ComponentStyle)] #[non_exhaustive] struct GalleryTileStyle { @@ -366,7 +366,9 @@ struct GalleryTileStyle { focus: FocusLook, /// Between the tile's edge and its picture. pad: f32, - /// The current tile's outline: accent, unfilled, so the picture keeps its own background. + /// The current tile's outline: `accent.solid`, unfilled, so the picture keeps its own background. Not + /// `accent.border`, which several themes pin translucent to read on a control's own fill: with no fill under it, + /// it falls under 3:1 on the ribbon. edge: StyleColor, /// The ink of the item's name under the picture, in a captioned gallery. caption: StyleColor, @@ -439,7 +441,7 @@ impl Component for GalleryTile<'_> { metrics: Metrics::new().padding(Insets::new(pad, pad, pad, pad)), focus: cx.focus_look(), pad, - edge: cx.color(colors.accent.border), + edge: cx.color(colors.accent.solid), caption: cx.color(colors.text.normal), gap: cx.tokens.space.gap.tight, thumbs: [cx.tokens.size.thumb.sm, cx.tokens.size.thumb.md, cx.tokens.size.thumb.lg],