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 corner radius not scaling with theme scale in the default theme #79640

Merged

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Jul 18, 2023

This also uses rounding consistently for scale multipliers, so that behavior is more predictable with non-integer scale factors like 1.25 and 1.5.

The default theme's appearance is not affected at its default scale of 1.0, including when using the canvas_items stretch mode.

Testing project: https://github.com/godotengine/godot-demo-projects/tree/master/gui/control_gallery

Preview

Click to view at full size. Default Theme Scale is set to 3.0 on those screenshots.

Before After
Screenshot_20230719_000017 Screenshot_20230719_000004

For comparison, this is the UI when using the canvas_items stretch mode and scaling up to 4K from 1152×648:

Screenshot_20230718_235948

This also uses rounding consistently for scale multipliers, so that
behavior is more predictable with non-integer scale factors like `1.25`
and `1.5`.
@Calinou Calinou requested a review from a team as a code owner July 18, 2023 22:01
@Calinou Calinou added bug topic:gui cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release labels Jul 18, 2023
@Calinou Calinou added this to the 4.2 milestone Jul 18, 2023
Copy link
Member

@adamscott adamscott left a comment

Choose a reason for hiding this comment

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

Seems fine to me! And it's now looking much better. Good job, Hugo.

@YuriSizov YuriSizov merged commit 1843781 into godotengine:master Jul 21, 2023
13 checks passed
@YuriSizov
Copy link
Contributor

Thanks!

@Calinou Calinou deleted the default-theme-scale-fix-corner-radius branch July 27, 2023 06:17
@YuriSizov YuriSizov removed the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Sep 21, 2023
@YuriSizov
Copy link
Contributor

For consistency I'd skip it from cherry-picking.

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.

None yet

3 participants