diff --git a/Common/UI/View.cpp b/Common/UI/View.cpp index 637709a296..3861adc1ca 100644 --- a/Common/UI/View.cpp +++ b/Common/UI/View.cpp @@ -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 { diff --git a/Common/UI/View.h b/Common/UI/View.h index d3322280aa..ee961d25ab 100644 --- a/Common/UI/View.h +++ b/Common/UI/View.h @@ -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;