Merge pull request #14713 from poke1024/fix14570
Fixes oversized tooltip labels (issue 14570)
This commit is contained in:
commit
0a724b81df
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user