#14286: No OK/Cancel buttons in native wxColourDialog on OSX

61 views
Skip to first unread message

wxTrac

unread,
May 9, 2012, 2:00:16 PM5/9/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/14286>

#14286: No OK/Cancel buttons in native wxColourDialog on OSX
-------------------------+--------------------------------------------------
Reporter: ardi | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: wxOSX-Cocoa | Version: 2.9.3
Keywords: | Blockedby:
Patch: 0 | Blocking:
-------------------------+--------------------------------------------------
The native wxColourDialog has no OK/Cancel buttons on OSX.

You can see it in the dialogs.cpp sample.

It's a problem because the user cannot cancel the color selection: when
the dialog is closed, it always returns with an OK message.

It seems the OSX wxColourDialog _did_ have these buttons in a previous
version. Just see this screenshot showing the buttons from an older wx
release:

[[Image(http://flylib.com/books/3/138/1/html/2/images/0131473816/graphics/08fig17.gif;423381)]]


--
Ticket URL: <http://trac.wxwidgets.org/ticket/14286>

wxTrac

unread,
Oct 28, 2012, 9:02:55 PM10/28/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/14286#comment:1>

#14286: No OK/Cancel buttons in native wxColourDialog on OSX
-------------------------+--------------------------------------------------
Reporter: ardi | Owner:
Type: defect | Status: confirmed
Priority: normal | Milestone:
Component: wxOSX-Cocoa | Version: 2.9-svn
Keywords: | Blockedby:
Patch: 0 | Blocking:
-------------------------+--------------------------------------------------
Changes (by vadz):

* status: new => confirmed
* version: 2.9.3 => 2.9-svn


Comment:

I'm not sure if it's going to be possible to do anything about this, these
dialogs are simply not supposed to be used in the same way under OS X. The
best solution would IMHO be to have `wxEVT_COLOUR_CHOSEN` event that they
would send and emulate this event using modal dialogs under the other
platforms.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/14286#comment:1>

wxTrac

unread,
Oct 29, 2012, 4:56:22 AM10/29/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/14286#comment:2>

#14286: No OK/Cancel buttons in native wxColourDialog on OSX
-------------------------+--------------------------------------------------
Reporter: ardi | Owner:
Type: defect | Status: confirmed
Priority: normal | Milestone:
Component: wxOSX-Cocoa | Version: 2.9-svn
Keywords: | Blockedby:
Patch: 0 | Blocking:
-------------------------+--------------------------------------------------

Comment(by ardi):

Now I feel a bit puzzled about this. What's a Mac user expected to do if
he wants to cancel the new color selection he made? The obvious answer
would be he could undo the new setting, but, however, I was now playing
with the Terminal preferences, and you're right the color picker for the
Terminal colors lacks Ok/Cancel buttons, and... Terminal also lacks
undo/redo for user preferences, so... what you do if you don't want to
apply the new color selection?


--
Ticket URL: <http://trac.wxwidgets.org/ticket/14286#comment:2>

wxTrac

unread,
Oct 29, 2012, 9:34:53 AM10/29/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/14286#comment:3>

#14286: No OK/Cancel buttons in native wxColourDialog on OSX
-------------------------+--------------------------------------------------
Reporter: ardi | Owner:
Type: defect | Status: confirmed
Priority: normal | Milestone:
Component: wxOSX-Cocoa | Version: 2.9-svn
Keywords: | Blockedby:
Patch: 0 | Blocking:
-------------------------+--------------------------------------------------

Comment(by vadz):

This is the native UI, you may like or dislike it but this is the way it
works and I think that wx must do the same. The only problem is allowing
to write the user code in the same way, whether a modal or modeless dialog
is used, and this is what my `wxEVT_COLOUR_CHOSEN` proposal was meant to
address.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/14286#comment:3>

wxTrac

unread,
Nov 12, 2012, 4:04:42 AM11/12/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/14286#comment:4>

#14286: No OK/Cancel buttons in native wxColourDialog on OSX
-------------------------+--------------------------------------------------
Reporter: ardi | Owner:
Type: defect | Status: confirmed
Priority: normal | Milestone:
Component: wxOSX-Cocoa | Version: 2.9-svn
Keywords: | Blockedby:
Patch: 0 | Blocking:
-------------------------+--------------------------------------------------

Comment(by ardi):

Yes, I usually fully agree with Apple's HI Guidelines, but here I don't
get it. I mean, it's quite likely that a user is "playing" with a colour
dialog just for trying if he can find a better color for some use, and
then, finally realize the previous color was better, so he would just
cancel the dialog. However, it seems that the Apple way of doing this is
"always accept the new color, and then, if the user doesn't like it, allow
to undo it". On some cases like Terminal.app Apple even didn't implement
undo, so you cannot "play" with color settings and then revert to your
previous setting.

It's pretty weird, I don't get it.

Also, the only way to accept the color dialog is to close it by pressing
on the red cross button... quite a non-intuitive way.

This doesn't look Apple style, and I don't understand what they mean with
this color dialog style.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/14286#comment:4>

wxTrac

unread,
Jan 22, 2015, 2:35:08 AM1/22/15
to wx-...@googlegroups.com
#14286: No OK/Cancel buttons in native wxColourDialog on OSX
--------------------------+---------------------------
Reporter: ardi | Owner:
Type: defect | Status: confirmed
Priority: normal | Milestone:
Component: wxOSX-Cocoa | Version: stable-latest
Resolution: | Keywords:
Blocked By: | Blocking:
Patch: 0 |
--------------------------+---------------------------

Comment (by rocrail):

I'm having the same issue; No way to cancel it.
Any progress?

--
Ticket URL: <http://trac.wxwidgets.org/ticket/14286#comment:5>

wxTrac

unread,
Jan 22, 2015, 8:31:33 AM1/22/15
to wx-...@googlegroups.com
#14286: Send wxEVT_COLOUR_SELECTED from wxColourDialog to abstract platform
differences
--------------------------+---------------------------
Reporter: ardi | Owner:
Type: defect | Status: confirmed
Priority: low | Milestone:
Component: wxOSX-Cocoa | Version: stable-latest
Resolution: | Keywords:
Blocked By: | Blocking:
Patch: 0 |
--------------------------+---------------------------
Changes (by vadz):

* priority: normal => low


Comment:

No progress and we can't provide a way to cancel the colour selection
because Apple UI just doesn't work like this.

All we can do is to provide the previously mentioned
`wxEVT_COLOUR_SELECTED` event which would hide the difference between OS X
dialog and modal dialogs on the other platforms and allow writing the code
dealing with both.

--
Ticket URL: <http://trac.wxwidgets.org/ticket/14286#comment:6>

wxTrac

unread,
Feb 12, 2016, 5:59:17 PM2/12/16
to wx-...@googlegroups.com
#14286: Send wxEVT_COLOUR_SELECTED from wxColourDialog to abstract platform
differences
---------------------+---------------------------
Reporter: ardi | Owner:
Type: defect | Status: confirmed
Priority: low | Milestone:
Component: wxOSX | Version: stable-latest
Resolution: | Keywords:
Blocked By: | Blocking:
Patch: 0 |
---------------------+---------------------------

Comment (by ardi):

I've decided to "fix" this in my personal build by replacing the
wxColourDialog implementation in src/osx/carbon/colordlgosx.mm by the
Carbon implementation in src/osx/carbon/colordlg.cpp. The wxColourDialog
implementation is just 4 functions, so it's straightforward to do (just
copy 'n' paste exactly the same code from colordlg.cpp into
colordlgosx.mm).

This change makes you use the Carbon color picker, which has Ok / Cancel
buttons.

I don't consider the Cocoa NSColorPanel as the maximum fulfillment of
Apple's HI Guidelines. In fact, most Cocoa developers consider
NSColorPanel as a UI "subcomponent", rather than a ready-to-use color
chooser dialog.

I've verified that some current apps (i.e: Mathematica) still use the
Carbon color picker, with its Ok/Cancel buttons. I think the Mathematica
way is wise, and the fact they began development in the days of NeXT even
gives them more credibility.

--
Ticket URL: <http://trac.wxwidgets.org/ticket/14286#comment:7>
Reply all
Reply to author
Forward
0 new messages