UI: Round the corners of popups

FillRoundRect falls back to a square FillRect for drawables it can't
round, and a ViewGroup with round corners set rounds its background.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-10-27 21:47:06 +01:00
1 parent 476d020c58
commit 916dfab834
4 files changed
+11 -5

No files matched your search

+5 -1
View File
@@ -187,7 +187,11 @@ void ViewGroup::Draw(UIContext &dc) {
dc.PushScissor(bounds_);
}
dc.FillRect(bg_, bounds_);
if (roundCorners_ != RoundCorners::None) {
dc.FillRoundRect(bg_, bounds_, dc.GetTheme().choiceRoundRadius, roundCorners_);
} else {
dc.FillRect(bg_, bounds_);
}
for (View *view : views_) {
if (view->GetVisibility() == V_VISIBLE) {
// Check if bounds are in current scissor rectangle.