UI: Let clickable views be highlighted without the focus

SetHighlighted outlines the view, following its round corners, to point it
out without giving it the focus, which would turn on keyboard navigation.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-10-25 13:44:44 +01:00
1 parent 1c067f32a4
commit 30c9dd3b45
2 files changed
+7

No files matched your search

+3
View File
@@ -217,6 +217,9 @@ void Clickable::DrawBG(UIContext &dc, const Style &style) {
} else {
dc.FillRoundRect(style.background, bounds_, dc.GetTheme().choiceRoundRadius, roundCorners_);
}
if (highlighted_) {
dc.Draw()->DrawRoundRect(bounds_, dc.GetTheme().choiceRoundRadius, 0xFFFFFFFF, RoundRectStyle::OutlineThin, roundCorners_);
}
}
void Clickable::ClickInternal() {