From 7669eea855ac536884e753f8c4e2bc7299368792 Mon Sep 17 00:00:00 2001 From: kobewi Date: Sun, 29 Jan 2023 17:58:52 +0100 Subject: [PATCH] Tweak overrun behavior of EditorPropertyObjectID --- editor/editor_properties.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 152e77acb7a..f022027e650 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -1323,10 +1323,12 @@ void EditorPropertyObjectID::update_property() { ObjectID id = get_edited_object()->get(get_edited_property()); if (id.is_valid()) { edit->set_text(type + " ID: " + uitos(id)); + edit->set_tooltip_text(type + " ID: " + uitos(id)); edit->set_disabled(false); edit->set_icon(EditorNode::get_singleton()->get_class_icon(type)); } else { edit->set_text(TTR("")); + edit->set_tooltip_text(""); edit->set_disabled(true); edit->set_icon(Ref()); } @@ -1343,6 +1345,7 @@ EditorPropertyObjectID::EditorPropertyObjectID() { edit = memnew(Button); add_child(edit); add_focusable(edit); + edit->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_ELLIPSIS); edit->connect("pressed", callable_mp(this, &EditorPropertyObjectID::_edit_pressed)); }