Skip to content

Commit 40cf5a0

Browse files
committed
Merge pull request #114169 from YeldhamDev/really_reduce_icon_size
Fix icon resizing for `NodePath` properties not working
2 parents 2f0fe04 + 12e451b commit 40cf5a0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎editor/inspector/editor_properties.cpp‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3200,6 +3200,9 @@ void EditorPropertyNodePath::_notification(int p_what) {
32003200
menu->get_popup()->set_item_icon(ACTION_COPY, get_editor_theme_icon(SNAME("ActionCopy")));
32013201
menu->get_popup()->set_item_icon(ACTION_EDIT, get_editor_theme_icon(SNAME("Edit")));
32023202
menu->get_popup()->set_item_icon(ACTION_SELECT, get_editor_theme_icon(SNAME("ExternalLink")));
3203+
3204+
// Use a constant width for the icon to avoid sizing issues or blurry icons.
3205+
assign->add_theme_constant_override("icon_max_width", get_theme_constant(SNAME("class_icon_size"), EditorStringName(Editor)));
32033206
} break;
32043207

32053208
case NOTIFICATION_DRAG_BEGIN: {
@@ -3260,8 +3263,6 @@ EditorPropertyNodePath::EditorPropertyNodePath() {
32603263
assign->set_h_size_flags(SIZE_EXPAND_FILL);
32613264
assign->set_clip_text(true);
32623265
assign->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
3263-
// Use a constant width for the icon to avoid sizing issues or blurry icons.
3264-
assign->add_theme_constant_override("icon_max_width", get_theme_constant(SNAME("class_icon_size"), EditorStringName(Editor)));
32653266
assign->set_expand_icon(true);
32663267
assign->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyNodePath::_node_assign));
32673268
assign->connect(SceneStringName(draw), callable_mp(this, &EditorPropertyNodePath::_assign_draw));

0 commit comments

Comments
 (0)