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

Change GUI controls pixel snap to round halfway towards positive infinity (floor(x + 0.5)) #93749

Conversation

alvinhochun
Copy link
Contributor

This is the same thing as #93740 but for GUI controls, for consistency.

@alvinhochun alvinhochun requested a review from a team as a code owner June 29, 2024 16:36
@adamscott adamscott added this to the 4.3 milestone Jun 29, 2024
@adamscott adamscott self-assigned this Jun 29, 2024
@adamscott adamscott added the bug label Jun 29, 2024
@adamscott
Copy link
Member

Hello @alvinhochun! Congrats for your first PR, and welcome!

I created an MRP based on the one you created for #93731, and it seems to exhibit the same issue for Controls without your PR. With yours, it seems to fix the issue.

Here it is:
pixel-snapping-negative-bug-gui.zip

I tested Catburglar with it and it doesn't seem to cause any visible issues. I'll continue testing for possible issues on GUI intensive games. But at first glance, it seems like a welcome addition for 4.3.

Thanks again!

@akien-mga akien-mga requested a review from adamscott July 9, 2024 08:39
@akien-mga
Copy link
Member

CC @markdibarry

Copy link
Contributor

@markdibarry markdibarry left a comment

Choose a reason for hiding this comment

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

Using the MRP, when moving around on screen, I was able to see the 1px gaps on master and it looks like there aren't any using this PR. LGTM.

@akien-mga akien-mga merged commit 5da0354 into godotengine:master Jul 17, 2024
18 checks passed
@akien-mga
Copy link
Member

Thanks!

@alvinhochun alvinhochun deleted the gui-snap-to-pixel-round-halfway-to-positive branch July 29, 2024 16:22
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.

4 participants