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

Fix tooltip content being cut off at some display scales #91965

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

aaronp64
Copy link
Contributor

When getting the minimum size for a tooltip, we get the value as a Vector2. Window::set_size() takes a Vector2i, so this size was getting truncated. At certain display scales, this could be enough to cut off part of the tooltip. Updated to call Vector2::ceil() to round up before calling Window::set_size()

Fixes #91958

@aaronp64 aaronp64 requested a review from a team as a code owner May 14, 2024 23:17
@AThousandShips AThousandShips added this to the 4.3 milestone May 15, 2024
@AThousandShips

This comment was marked as resolved.

When getting the minimum size for a tooltip, we get the value as a Vector2.  Window::set_size() takes a Vector2i, so this size was getting truncated.  At certain display scales, this could be enough to cut off part of the tooltip.  Updated to call Vector2::ceil() to round up before calling Window::set_size()

Fixes godotengine#91958
@aaronp64 aaronp64 changed the title Call Vector2::ceil() on tooltip size before passing into Window::set_size() Fix tooltip content being cut off at some display scales May 15, 2024
@clayjohn clayjohn modified the milestones: 4.3, 4.4 Jul 24, 2024
Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me. Seems like a low risk fix, so let's go ahead with it for 4.4

@akien-mga akien-mga added the cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release label Aug 16, 2024
@akien-mga akien-mga merged commit a86c3e4 into godotengine:master Aug 16, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

Cherry-picked for 4.3.1.

@akien-mga akien-mga removed the cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tooltip is missing info text (Layer values, Node type, Configuration warning)
4 participants