-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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
Tweak error and warning colors and fix StatusWarning
icon visibility on light themes
#88058
Tweak error and warning colors and fix StatusWarning
icon visibility on light themes
#88058
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As simple as that! Thanks @rsubtil !
On the second "After" screenshot, the error color also seems to lack contrast when the button is not toggled. The toggle color itself seems to create contrast issues IMO. So I think we might need a bit more work than just special casing StatusWarning. |
The icon's opacity is decreased when the button isn't pressed – we probably need to lessen this effect, especially on light theme. |
0ba0bd5
to
09c65f4
Compare
I've tried to remove the exclusion for this icon (
But tweaking the icon's opacity as suggested by @Calinou does seem to fix the contrast issue. Here's the changes I've made (only on light mode and for the
(I've also included the hover state as I noticed it looked bad for the yellow icon)
|
Yeah I was about to point out that this is still lacking contrast. Overall the colors for both StatusError and StatusWarning on the light theme seem too washed out / desaturated IMO. And the pressed button color (blue-grayish) also seems too dark / dull IMO, at least from close up, maybe in context it feels more appropriate. |
The effect is indeed much less pronounced on the dark theme, likely because of the already dark blue tint overall:
I think reducing greatly the grayish tint works well for light themes, as the blue border is already a clear indicator of the button being toggled. All in all, the changes are now as follows:
|
dec3318
to
4088dab
Compare
I dig the orange hue for the warning color in the light theme. It's more contrasted. |
The new warning color is great! I've always found the previous warning color less than ideal on a light theme, so this is a big improvement. |
p_config.warning_color = Color("#d18f19"); | ||
p_config.error_color = Color("#cd3838"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest using the Color(float, float, float)
form which avoids storing a string in the binary, and therefore reduces binary size ever so slightly. Individually, it might not sound like much, but I did this on all colors in the codebase a while ago and it reduced binary size by a non-negligible amount.
Color::hex(0xrrggbbaa)
might reduce binary size further by using 1 integer instead of 3 floats as parameters, but that should be evaluated later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Color::hex(0xrrggbbaa)
can be shortened to Color(0xrrggbbaa)
, no? It's a direct replacement for hex string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My assumption was that the compiler was smarter than this but I suppose that these are among the many things to keep in mind. I did not expect for the Colors to be basically generated on the spot even for constant Strings.
By the way, I may be wrong but I believe the bits are reversed in pure hex: 0xaabbggrr
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went with the 3-float approach then, but I agree reducing it in the future to a single hex int sounds interesting, especially for iterating on the colors and not having to constantly convert them to a [0, 1] float range.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way, I may be wrong but I believe the bits are reversed in pure hex:
0xaabbggrr
.
The ARGB (not ABGR) convention was used in Godot 3.x, but Godot 4.0 switched to RGBA.
4088dab
to
16a1fc3
Compare
16a1fc3
to
db61cf8
Compare
StatusWarning
icon visibility on light themes
Since the new changes ended up affecting the overall interface significantly, and there was very positive feedback on the warning color changes, I've edited this PR description to better describe the changes done, along with some new comparison screenshots. |
There was a problem hiding this 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.
Thanks! |
Fixes #87987
Originally this PR focused on fixing visibility of the
StatusWarning
, but after successive iterations and positive feedback, a few more relevant alterations were made:StatusWarning
andStatusError
icons from the exclusion list to be able to convert its colorserror_color
to the same color used inNode3D
(#BF5A50
->#CD3838
)warning_color
to a more orange saturated hue (#A69042
->#D18F19
)EditorLogFilterButton
appearance (more comparison screenshots at Tweak error and warning colors and fixStatusWarning
icon visibility on light themes #88058 (comment)):normal
color opacity from 40% to 80%hover
color modulate, making it now the original color, aka 100%pressed
state by 50%Comparison screenshots