diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-02-22 21:12:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-22 21:12:25 +0100 |
commit | e1e52b3736c34ba48cbcb3c62c967c035f5a2818 (patch) | |
tree | 1d27a767b724cab20f7df266a7a651f201062553 /scene/gui | |
parent | 0f9da46b008077cef20cf594e5e43861fe81e859 (diff) | |
parent | d6a9cff8b7cbacec81a924c65a02736a5dba9b53 (diff) |
Merge pull request #46315 from reduz/add-preview-sun-and-env
Add preview Sun and Environment
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/button.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp index 37bb17b47d..b0bcde8865 100644 --- a/scene/gui/button.cpp +++ b/scene/gui/button.cpp @@ -56,6 +56,11 @@ Size2 Button::get_minimum_size() const { } } + Ref<Font> font = get_theme_font("font"); + float font_height = font->get_height(get_theme_font_size("font_size")); + + minsize.height = MAX(font_height, minsize.height); + return get_theme_stylebox("normal")->get_minimum_size() + minsize; } |