Merge pull request #82540 from jackwilsdon/fix-inspector-category-height

Use theme icon size when calculating category minimum size
This commit is contained in:
Rémi Verschelde 2023-09-30 11:02:45 +02:00
commit eb14308ebc
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -1188,7 +1188,8 @@ Size2 EditorInspectorCategory::get_minimum_size() const {
Size2 ms; Size2 ms;
ms.height = font->get_height(font_size); ms.height = font->get_height(font_size);
if (icon.is_valid()) { 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")); ms.height += get_theme_constant(SNAME("v_separation"), SNAME("Tree"));