diff options
author | Jack Wilsdon <jack.wilsdon@gmail.com> | 2023-09-29 18:49:25 +0100 |
---|---|---|
committer | Jack Wilsdon <jack.wilsdon@gmail.com> | 2023-09-29 18:50:32 +0100 |
commit | 4a33a51ea44b3f9aebc8f327b99b2ac05b0f9462 (patch) | |
tree | 10f46fefd8fc678f7fe4c1e2e957e9bfd1586f1d /editor/editor_inspector.cpp | |
parent | 19890614c6a78ec36030ce65c7da05f07fcdb9ed (diff) | |
download | redot-engine-4a33a51ea44b3f9aebc8f327b99b2ac05b0f9462.tar.gz |
Use theme icon size when calculating category minimum size
This previously used the underlying size of the icon, causing the
category to grow incorrectly when re-rendered.
Fixes #82527
Diffstat (limited to 'editor/editor_inspector.cpp')
-rw-r--r-- | editor/editor_inspector.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index ab689ad056..382b182e0e 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -1188,7 +1188,8 @@ Size2 EditorInspectorCategory::get_minimum_size() const { Size2 ms; ms.height = font->get_height(font_size); if (icon.is_valid()) { - ms.height = MAX(icon->get_height(), ms.height); + int icon_size = get_theme_constant(SNAME("class_icon_size"), EditorStringName(Editor)); + ms.height = MAX(icon_size, ms.height); } ms.height += get_theme_constant(SNAME("v_separation"), SNAME("Tree")); |