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

Allow additional hexadecimal color codes in ColorPicker #84442

Merged

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Nov 4, 2023

The following formats are now accepted (leading # is optional):

  • #1#111111
  • #12#121212
  • #12345#11223344 (5 at the end is discarded)
  • #1234567#123456 (7 at the end is discarded)

I've tested named color input and it still works as expected.


Preview

simplescreenrecorder-2023-11-04_11.05.02.mp4

@akien-mga akien-mga requested a review from KoBeWi January 4, 2024 14:16
@KoBeWi
Copy link
Member

KoBeWi commented Jan 4, 2024

Needs rebase.

@Calinou Calinou force-pushed the colorpicker-allow-more-hex-codes branch from 662a110 to 46a94b6 Compare January 5, 2024 15:42
@Calinou
Copy link
Member Author

Calinou commented Jan 5, 2024

Needs rebase.

Rebased and tested again following #85749, it works as expected.

@Calinou Calinou force-pushed the colorpicker-allow-more-hex-codes branch from 46a94b6 to 760cc5a Compare January 8, 2024 19:23
scene/gui/color_picker.cpp Outdated Show resolved Hide resolved
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.

Seems like the last change needs to be reverted 🙃
Looks fine otherwise.

The following formats are now accepted (leading `#` is optional):

- `#1` -> `#111111`
- `godotengine#12` -> `#121212`
- `godotengine#12345` -> `#11223344` (`5` at the end is discarded)
- `#1234567` -> `#123456` (`7` at the end is discarded)
@Calinou Calinou force-pushed the colorpicker-allow-more-hex-codes branch from 760cc5a to 80a770a Compare January 8, 2024 19:51
@Calinou
Copy link
Member Author

Calinou commented Jan 8, 2024

Seems like the last change needs to be reverted 🙃

Done.

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Jan 9, 2024
@akien-mga akien-mga merged commit 4181027 into godotengine:master Jan 9, 2024
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@Calinou Calinou deleted the colorpicker-allow-more-hex-codes branch January 9, 2024 23:04
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.

Improve color selector editable hex code entry handling
4 participants