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 ColorPicker shape icon is invisible until shape is changed #84535

Merged

Conversation

DinDotDout
Copy link
Contributor

@DinDotDout DinDotDout commented Nov 6, 2023

Fixes #84519

@DinDotDout DinDotDout requested a review from a team as a code owner November 6, 2023 16:26
@AThousandShips AThousandShips changed the title Set_icon on notification not constructor Fix ColorPicker shape icon is invisible Nov 6, 2023
@AThousandShips AThousandShips added bug topic:gui cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release labels Nov 6, 2023
@AThousandShips AThousandShips added this to the 4.3 milestone Nov 6, 2023
@AThousandShips AThousandShips changed the title Fix ColorPicker shape icon is invisible Fix ColorPicker shape icon is invisible until shape is changed Nov 6, 2023
@DinDotDout DinDotDout force-pushed the ColorPicker-shape-icon-fix branch from fe0106a to 15ec132 Compare November 6, 2023 17:10
Copy link
Contributor

@YuriSizov YuriSizov 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!

Unrelated to this PR since this is what existing code looks like, but it seems like we're abusing the fact that IDs and indices of the shape popup match. Sometimes we're using SHAPE_* constants to get the index and sometimes we're using them directly as index.

This should be cleaned up at some point (but again, that's not something this PR introduces or needs to address).

@YuriSizov YuriSizov modified the milestones: 4.3, 4.2 Nov 6, 2023
@YuriSizov YuriSizov removed the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Nov 6, 2023
@DinDotDout
Copy link
Contributor Author

Ah i see they are being added into a vector in an order matching their enum value. I still need to familiarize myself with C++, setup my editor properly and test a faster building system but i could look into it when i am a bit more versed in a new pr.

@KoBeWi
Copy link
Member

KoBeWi commented Nov 6, 2023

There are plans for refactoring the picker shapes entirely, as the remaining part of godotengine/godot-proposals#4353, but that's a bigger task.

@DinDotDout
Copy link
Contributor Author

I noticed that hsl is the only mode that still displays a choser when none is set. I have not dug into the code but they may be hardcoded together

@YuriSizov YuriSizov merged commit c3111c3 into godotengine:master Nov 7, 2023
15 checks passed
@YuriSizov
Copy link
Contributor

Thanks! And congrats on your first merged Godot PR!

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.

ColorPicker shape icon is invisible until shape is changed
4 participants