-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 color picker dismissed callback #5241
base: develop
Are you sure you want to change the base?
Fix color picker dismissed callback #5241
Conversation
I would prefer that we match the data input dialogs not the file dialogs. |
I didn't look at the data input dialogs at all yet. |
The trouble with adding a "callback(nil)" to all dialogs is that some are picking an item that has a valid zero value. The File dialog "calls nil on cancel" was added before the |
OK. I will look into the order of callbacks tomorrow. |
I updated the PR with the correct callback order. |
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.
The change of order seems reasonable, but the adding of possible panics worries me.
I have looked into this to approve and only just realised (sorry if there was a discussion before) that this makes the close order different for the colour picker than for all others. It could be checked by using the other data input dialogs (Form, Entry) in the context of your dialog library to see if you get data from either of those. |
I am happy to make this change. I am on my way to a conference in Berlin (DevFest, where I will give a talk about the |
Description:
Call the callback provided to the color picker dialog with a
nil
color if the dialog is dismissed.So users can easily distinguish between confirmation and dismissal and react to it.
This is inline with how all the file related dialogs work (fileSave, fileOpen and folderOpen).
Fixes #5237
Checklist:
Where applicable: