summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-12-15 23:52:15 +0100
committerGitHub <noreply@github.com>2017-12-15 23:52:15 +0100
commit0a724b81df78daf2a337d65f18c8e48d5e41e795 (patch)
tree4fb4eacfd91ada287b49063821485080e48b0f32 /scene
parent747d1c96a493883a70d2e3b0178f6dde36aff48a (diff)
parent0d826717e7fa838b418bcc8f8f0fa7e48062bf33 (diff)
Merge pull request #14713 from poke1024/fix14570
Fixes oversized tooltip labels (issue 14570)
Diffstat (limited to 'scene')
-rw-r--r--scene/main/viewport.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 4635de81e8..f5d7043a40 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -1421,7 +1421,7 @@ void Viewport::_gui_show_tooltip() {
gui.tooltip_label->set_anchor_and_margin(MARGIN_TOP, Control::ANCHOR_BEGIN, ttp->get_margin(MARGIN_TOP));
gui.tooltip_label->set_anchor_and_margin(MARGIN_RIGHT, Control::ANCHOR_END, -ttp->get_margin(MARGIN_RIGHT));
gui.tooltip_label->set_anchor_and_margin(MARGIN_BOTTOM, Control::ANCHOR_END, -ttp->get_margin(MARGIN_BOTTOM));
- gui.tooltip_label->set_text(tooltip);
+ gui.tooltip_label->set_text(tooltip.strip_edges());
Rect2 r(gui.tooltip_pos + Point2(10, 10), gui.tooltip_label->get_combined_minimum_size() + ttp->get_minimum_size());
Rect2 vr = gui.tooltip_label->get_viewport_rect();
if (r.size.x + r.position.x > vr.size.x)