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

Fixes and improvements to Gradient preview #68964

Merged
merged 1 commit into from
Nov 22, 2022

Conversation

MewPurPur
Copy link
Contributor

@MewPurPur MewPurPur commented Nov 21, 2022

This PR takes the handles' width into consideration when drawing color ramps, so they don't collide with other elements or get outside of the preview.

Before:

image

After:

image


It also draws the focus rect earlier, making it not overlap the handles.

Before:

image

After:

image

@MewPurPur MewPurPur force-pushed the tweak-gradient-editor branch from 7034ca8 to b511256 Compare November 21, 2022 18:06
@MewPurPur MewPurPur marked this pull request as draft November 21, 2022 18:13
@MewPurPur MewPurPur marked this pull request as ready for review November 21, 2022 18:22
@MewPurPur MewPurPur changed the title Fix clipping in Gradient preview Fix mistakes in Gradient preview Nov 21, 2022
@MewPurPur MewPurPur force-pushed the tweak-gradient-editor branch from b511256 to d99a958 Compare November 21, 2022 18:28
@MewPurPur
Copy link
Contributor Author

MewPurPur commented Nov 21, 2022

Ooh, while at it, I can also fix the thing with handles blending in with gray colors

Edit: Doned. Just checks if value is high or low, and draws black or white based on it.

Before:

Screenshot from 2022-11-21 20-05-41

After:

image

@MewPurPur MewPurPur force-pushed the tweak-gradient-editor branch from d99a958 to 2f01537 Compare November 21, 2022 19:12
@MewPurPur MewPurPur changed the title Fix mistakes in Gradient preview Fixes and improvements to Gradient preview Nov 21, 2022
@Calinou Calinou added this to the 4.0 milestone Nov 21, 2022
@MewPurPur MewPurPur force-pushed the tweak-gradient-editor branch from 2f01537 to 3c54d87 Compare November 21, 2022 22:33
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!

@akien-mga akien-mga merged commit 4b4e701 into godotengine:master Nov 22, 2022
@akien-mga
Copy link
Member

Thanks!

@MewPurPur MewPurPur deleted the tweak-gradient-editor branch November 22, 2022 10:48
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