summaryrefslogtreecommitdiff
path: root/scene/gui/option_button.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-08-22 22:40:59 +0200
committerGitHub <noreply@github.com>2022-08-22 22:40:59 +0200
commitb9ea0e1338b1364fc6ecfd5731d038c32170e660 (patch)
treeb37606a48065d25aa7a474a56b912ff9c8e52b34 /scene/gui/option_button.cpp
parentb8a64313f0675a7e781e21b530a43d824651f44d (diff)
parent4a3a15c30433f1c9b28873a74c23bec6564a3bc8 (diff)
Merge pull request #64218 from Rindbee/fix-button-minimum-size-calculation
Diffstat (limited to 'scene/gui/option_button.cpp')
-rw-r--r--scene/gui/option_button.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp
index 851d425bfc..a5a6240e27 100644
--- a/scene/gui/option_button.cpp
+++ b/scene/gui/option_button.cpp
@@ -47,7 +47,7 @@ Size2 OptionButton::get_minimum_size() const {
const Size2 arrow_size = Control::get_theme_icon(SNAME("arrow"))->get_size();
Size2 content_size = minsize - padding;
- content_size.width += arrow_size.width + get_theme_constant(SNAME("h_separation"));
+ content_size.width += arrow_size.width + MAX(0, get_theme_constant(SNAME("h_separation")));
content_size.height = MAX(content_size.height, arrow_size.height);
minsize = content_size + padding;