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

Round the icon's drawing rect when drawing the button #91802

Merged

Conversation

Rindbee
Copy link
Contributor

@Rindbee Rindbee commented May 10, 2024

Each component of the icon's drawing rect needs to be snapped to an integer.

Fix #88165.

Each component of the icon's drawing rect needs to be snapped to an
integer.
Copy link
Contributor

@Maran23 Maran23 left a comment

Choose a reason for hiding this comment

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

Looks good to me.
I can confirm that this fixes the issue.
Also, this looks good code wise.
The code before also floored and rounded the icon size, and the rationale here makes sense to me.

@akien-mga akien-mga requested review from KoBeWi and bruvzg May 13, 2024 13:02
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Tested locally, it works as expected. This makes sense to do regardless of the Snap Controls to Pixels project setting, as that project setting should only control snapping of controls as a whole, not their individual draw calls within.

@akien-mga akien-mga merged commit 2b3d913 into godotengine:master May 14, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@Rindbee Rindbee deleted the round-icon-rect-when-drawing-the-button branch May 20, 2024 05:41
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.

Main editor toolbar icons are blurry
5 participants