Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scaling RichTextLabel does not update hint tooltip text popup location #91984

Open
emirljuca opened this issue May 15, 2024 · 0 comments · May be fixed by #91997
Open

Scaling RichTextLabel does not update hint tooltip text popup location #91984

emirljuca opened this issue May 15, 2024 · 0 comments · May be fixed by #91997

Comments

@emirljuca
Copy link

Tested versions

Found in v4.2.stable.mono.official [46dc277], tested in v4.3-dev6.mono.official and found similar issue, tested in v4.1.4.stable.mono.official and found similar issue.

System information

Windows 11 - v4.2.stable.mono.official - OpenGL API 3.3.0 Core Profile Context 24.1.1.240110 - Compatibility - Using Device: ATI Technologies Inc. - AMD Radeon RX 6950 XT

Issue description

When I change the scale of a control node with a rich text label in it, the tooltip popup location of the text with the hint doesn't seem to move with the now scaled text position and size. If I change the font size, the hint popup location moves, it seems to just be an issue with the scale feature of control nodes.

unknown_2024 05 15-11 07_1

Steps to reproduce

  1. Create a control node
  2. Add a margin container as child
  3. Add a rich text container as child to margin container
  4. Add code that changes scale of margin container

Minimal reproduction project (MRP)

RichTextLabelHintTestZip.zip

aaronp64 added a commit to aaronp64/godot that referenced this issue May 15, 2024
Viewport used get_global_transform().xform_inv(mpos) to convert the mouse position to the control's local coordinates when getting the control's tooltip, which does not handle scale correctly.  This impacted tooltips for any controls that depended on the position to determine what tooltip to show, including RichTextLabel, ItemList, Tree, and probably some others.  This change is for Viewport to use get_global_transform_with_canvas().affine_inverse().xform(mpos) for tooltips instead, to match what we do for Viewport::_gui_call_input.

Fixes godotengine#91984
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants