summaryrefslogtreecommitdiffstats
path: root/editor/debugger/editor_debugger_tree.cpp
diff options
context:
space:
mode:
authorSpartan322 <Megacake1234@gmail.com>2024-10-18 17:26:56 -0400
committerSpartan322 <Megacake1234@gmail.com>2024-10-18 17:26:56 -0400
commitebbe3e8c51fcf89f6b19a74497cedb5a8c448979 (patch)
tree075435b3a1b3ac57a75f1ca90865f61697c053f4 /editor/debugger/editor_debugger_tree.cpp
parentedb8e2b1b2b09236bdcd76cb6c8b40b6fbb2abaf (diff)
parent80f0b33313dae52d072ba2771a88ebcc4f0b4d6d (diff)
downloadredot-engine-ebbe3e8c51fcf89f6b19a74497cedb5a8c448979.tar.gz
Merge commit godotengine/godot@80f0b33313dae52d072ba2771a88ebcc4f0b4d6d
Diffstat (limited to 'editor/debugger/editor_debugger_tree.cpp')
-rw-r--r--editor/debugger/editor_debugger_tree.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/editor/debugger/editor_debugger_tree.cpp b/editor/debugger/editor_debugger_tree.cpp
index fc9445e42c..6c03931c40 100644
--- a/editor/debugger/editor_debugger_tree.cpp
+++ b/editor/debugger/editor_debugger_tree.cpp
@@ -279,11 +279,14 @@ Variant EditorDebuggerTree::get_drag_data(const Point2 &p_point) {
}
String path = selected->get_text(0);
+ const int icon_size = get_theme_constant(SNAME("class_icon_size"), EditorStringName(Editor));
HBoxContainer *hb = memnew(HBoxContainer);
TextureRect *tf = memnew(TextureRect);
tf->set_texture(selected->get_icon(0));
- tf->set_stretch_mode(TextureRect::STRETCH_KEEP_CENTERED);
+ tf->set_custom_minimum_size(Size2(icon_size, icon_size));
+ tf->set_stretch_mode(TextureRect::STRETCH_KEEP_ASPECT_CENTERED);
+ tf->set_expand_mode(TextureRect::EXPAND_IGNORE_SIZE);
hb->add_child(tf);
Label *label = memnew(Label(path));
hb->add_child(label);