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 <noreply@anthropic.com>
This commit is contained in:
Martin BallandClaude Opus 5.5 committed 2026-11-25 10:32:25 +00:00
1 parent 7f8fec0e54
commit 3b36acc52b
1 file changed
+5 -3
+5 -3
View File
@@ -356,7 +356,7 @@ fn grid<K>(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],