Merge pull request #91997 from aaronp64/tooltip_transforms
Fix tooltip mouse position conversion for scaled controls
This commit is contained in:
commit
b7ea8415c2
1 changed files with 2 additions and 2 deletions
|
@ -1430,7 +1430,7 @@ void Viewport::_gui_show_tooltip() {
|
|||
Control *tooltip_owner = nullptr;
|
||||
gui.tooltip_text = _gui_get_tooltip(
|
||||
gui.tooltip_control,
|
||||
gui.tooltip_control->get_global_transform().xform_inv(gui.last_mouse_pos),
|
||||
gui.tooltip_control->get_global_transform_with_canvas().affine_inverse().xform(gui.last_mouse_pos),
|
||||
&tooltip_owner);
|
||||
gui.tooltip_text = gui.tooltip_text.strip_edges();
|
||||
|
||||
|
@ -1910,7 +1910,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
|
|||
|
||||
if (gui.tooltip_popup) {
|
||||
if (gui.tooltip_control) {
|
||||
String tooltip = _gui_get_tooltip(over, gui.tooltip_control->get_global_transform().xform_inv(mpos));
|
||||
String tooltip = _gui_get_tooltip(over, gui.tooltip_control->get_global_transform_with_canvas().affine_inverse().xform(mpos));
|
||||
tooltip = tooltip.strip_edges();
|
||||
|
||||
if (tooltip.is_empty() || tooltip != gui.tooltip_text) {
|
||||
|
|
Loading…
Reference in a new issue