UI: Give RadioButton the same padding and height as CheckBox

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-11-05 18:48:11 +01:00
1 parent 28eddf4f6b
commit d756893c1c
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -1075,9 +1075,9 @@ void RadioButton::GetContentDimensions(const UIContext &dc, float &w, float &h)
dc.MeasureText(dc.GetTheme().uiFont, 1.0f, 1.0f, text_, &w, &h);
}
// Add some internal padding to not look totally ugly
// Padding on both sides, and between the radio image and the text. Same height as a CheckBox.
w += paddingW_ * 3.0f + radioRadius_ * 2.0f;
h = std::max(h, radioRadius_ * 2) + paddingH_ * 2;
h = std::max(std::max(h, radioRadius_ * 2), ITEM_HEIGHT);
}
std::string RadioButton::DescribeText() const {
+2 -2
View File
@@ -1011,8 +1011,8 @@ private:
int *value_;
int thisButtonValue_;
std::string text_;
const float paddingW_ = 8;
const float paddingH_ = 4;
// Same as CheckBox.
const float paddingW_ = 12;
// Half the size of the I_RADIO_* images.
const float radioRadius_ = 16.0f;