Make icons of scripted and custom classes fit the editor UI

Also:
- Add an option to limit the icon size in PopupMenu.
This is similar to how this works in Tree and TreeItem.
- Add the same option to TabBar.
- Add a theme constant for Tree, PopupMenu, Button, and
TabBar to apply this limit on the control level.

Co-authored-by: Daylily-Zeleen <daylily-zeleen@foxmail.com>
This commit is contained in:
Yuri Sizov 2023-03-31 21:17:59 +02:00
parent 9fae65404a
commit 1522762dc9
28 changed files with 339 additions and 89 deletions

View file

@ -878,6 +878,8 @@ void SceneTreeEditor::_notification(int p_what) {
} break;
case NOTIFICATION_THEME_CHANGED: {
tree->add_theme_constant_override("icon_max_width", get_theme_constant(SNAME("class_icon_size"), SNAME("Editor")));
_update_tree();
} break;
}