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

Close ColorPicker if holding Ctrl while confirming a color selection #84447

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Nov 4, 2023

This works with the color sliders and text fields, the HTML color text field, the swatch preset buttons (manual presets and recent colors), the revert area and the color picker area (UV and W).

Preview

simplescreenrecorder-2023-11-04_12.50.48.mp4

@Mickeon
Copy link
Contributor

Mickeon commented Nov 4, 2023

I don't know about this. I've never seen a shortcut like this before. Perhaps it would be better to try updating the chosen color as you're writing it. Pressing Enter alone to close the ColorPicker sounds like it should be the default.

scene/gui/color_picker.cpp Outdated Show resolved Hide resolved
@KoBeWi
Copy link
Member

KoBeWi commented Nov 4, 2023

I think releasing picker shape (e.g. wheel) while holding Ctrl should also close the picker.

@Calinou Calinou force-pushed the colorpicker-close-on-ctrl-submit branch from 04d0780 to 6e42a3e Compare November 6, 2023 12:01
@Calinou
Copy link
Member Author

Calinou commented Nov 6, 2023

I think releasing picker shape (e.g. wheel) while holding Ctrl should also close the picker.

Done 🙂 I've also implemented this for the revert area (the left side of the preview that can be clicked to revert to the previous color).

I don't know about this. I've never seen a shortcut like this before. Perhaps it would be better to try updating the chosen color as you're writing it. Pressing Enter alone to close the ColorPicker sounds like it should be the default.

We could consider doing this for HTML input, but this is a more disruptive change (while you can ignore this one if you don't need it). This can't be done for all kinds of color picking (such as using the wheel and swatches).

scene/gui/color_picker.cpp Outdated Show resolved Hide resolved
scene/gui/color_picker.cpp Outdated Show resolved Hide resolved
@Calinou Calinou force-pushed the colorpicker-close-on-ctrl-submit branch from 6e42a3e to 15868a2 Compare November 6, 2023 13:37
@Calinou Calinou requested a review from a team as a code owner November 6, 2023 13:37
doc/classes/ColorPicker.xml Outdated Show resolved Hide resolved
@Calinou Calinou force-pushed the colorpicker-close-on-ctrl-submit branch from 15868a2 to 7bcb2aa Compare November 6, 2023 14:01
This works with the color sliders and text fields, the HTML color text
field, the swatch preset buttons (manual presets and recent colors),
the revert area and the color picker area (UV and W).
@Calinou Calinou force-pushed the colorpicker-close-on-ctrl-submit branch from 7bcb2aa to ac684e3 Compare January 10, 2024 02:08
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