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

Remember last color_mode and picker_shape in ColorPickers in the editor #86129

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

TheSofox
Copy link
Contributor

Fixes #86063

Now when using ColorPicker in the Editor, it will always use the last color_mode (RGB/HSV/etc) and picker_shape (Rectangle/Wheel/Circle/etc.) that the user chose in ANY ColorPicker. (eg. If you chose HSV while in the Picker for a Sprite's modulate colour, then HSV will be chosen if you then open the Picker for the Color of a ColorRect)

This is a Project specific setting. The first time the Project is started, it will use EditorSettings for the default of these two values. Any changes will persist across all Pickers in the project and across closing and opening the project again (values saved to hard drive). It will NOT affect Pickers in exported running projects, this is Editor only.

@TheSofox TheSofox requested a review from a team as a code owner December 13, 2023 20:17
@YeldhamDev YeldhamDev added this to the 4.x milestone Dec 13, 2023
@fire fire requested a review from a team December 14, 2023 14:57
@YuriSizov YuriSizov changed the title ColorPicker now remembers last color_mode and picker_shape in Editor Remember last color_mode and picker_shape in ColorPickers in the editor Dec 14, 2023
@YuriSizov
Copy link
Contributor

Note that our preferred commit message format is to start with a verb and then follow up with the body of the change. Please amend your commit message to be similar to what the title of the PR is right now.

@TheSofox
Copy link
Contributor Author

Amended commit message. I'll try to remember to start commit messages with a verb from now on.

Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

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

I see 2 concerns here:

  • Users might get confused that changing editor setting has no effect. This can be solved with documentation probably, and I doubt someone will change this more than once anyway
  • When opening color picker, the setting is immediately written to the file, because editor calls set_color_mode() and set_picker_shape(). This could be solved with an intermediate method called when changing the modes manually (i.e. not from code)

The implementation looks good though, so the above remarks can be addressed later.

@YuriSizov YuriSizov modified the milestones: 4.x, 4.3 Dec 14, 2023
@YuriSizov YuriSizov merged commit a5529f7 into godotengine:master Dec 14, 2023
15 checks passed
@YuriSizov
Copy link
Contributor

Thanks!

@TheSofox TheSofox deleted the color-picker-memory branch December 15, 2023 12:41
@TheSofox TheSofox restored the color-picker-memory branch December 15, 2023 12: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.

No picker mode is recorded after the next switchover
4 participants