File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
addons/pandora/ui/editor/inspector Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,16 @@ func _init(class_data: Dictionary) -> void:
1414
1515 var id_counter = 0
1616 var all_entities = _find_all_entities (class_data ["path" ])
17+ var editor_plugin : EditorPlugin = Engine .get_meta ("PandoraEditorPlugin" , null )
18+ # Prevent button from expanding to selected icon size.
19+ property_control .set_expand_icon (true )
1720
1821 for entity in all_entities :
1922 property_control .get_popup ().add_icon_item (
2023 load (entity .get_icon_path ()), entity .get_entity_name (), id_counter
2124 )
25+ if editor_plugin :
26+ property_control .get_popup ().set_item_icon_max_width (id_counter , editor_plugin .get_editor_interface ().get_editor_scale () * 16 )
2227 # Godot 4.1+
2328 if property_control .get_popup ().has_method ("set_item_icon_modulate" ):
2429 property_control .get_popup ().set_item_icon_modulate (id_counter , entity .get_icon_color ())
You can’t perform that action at this time.
0 commit comments