#14482: Inconsistencies in NSColor usage creates a GUI bug for users with specialized Display Settings

6 views
Skip to first unread message

wxTrac

unread,
Jul 12, 2012, 10:15:44 PM7/12/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/14482>

#14482: Inconsistencies in NSColor usage creates a GUI bug for users with
specialized Display Settings
-------------------------------+--------------------------------------------
Reporter: kjones@… | Owner:
Type: defect | Status: new
Priority: low | Milestone:
Component: wxOSX-Cocoa | Version: 2.9-svn
Keywords: | Blockedby:
Patch: 1 | Blocking:
-------------------------------+--------------------------------------------
The number of users that will notice this bug is probably small.

However, the fix is extremely simple and straightforward.

Most portions of the wx Cocoa codebase use: [NSColor
colorWithCalibratedRed:]

Only two spots use: [NSColor colorWithDeviceRed:]

I recommend that everything use colorWithCalibratedRed. A patch is
attached.

I am attaching a screenshot showing the discoloration problem that becomes
apparent in a wxTextCtrl on a mac computer where someone has used "System
Preferences >> Displays >> Color" to configure custom ICC Profiles (in
~/Library/ColorSync/Profiles/). What *should* have happened to my
wxTextCtrl is that there should be a single uniform background color, and
only the text lettering should be a different color. What is actually
shown (the bug) is that there are two background colors. There is one
background color showing where no text has reached, and there is another
background color behind each typed letter.

The reason for the "two different background colors" is that
'wxWidgetCocoaImpl::SetBackgroundColour' uses 'colorWithCalibratedRed' to
take care of the background of the wxTextCtrl where no text letters have
been typed, and then 'wxNSTextViewControl::SetStyle' uses
'colorWithDeviceRed' (via a call to wxColour::OSXGetNSColor) to get a
slightly different background behind the lettering.

Again, this only becomes apparent on desktops where 'DeviceRed' and
'CalibratedRed' are actually different, which involves tweaking Display
settings in System Preferences.


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

wxTrac

unread,
Jul 13, 2012, 2:06:15 AM7/13/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/14482#comment:1>

#14482: Inconsistencies in NSColor usage creates a GUI bug for users with
specialized Display Settings
-------------------------------+--------------------------------------------
Reporter: kjones@… | Owner: csomor
Type: defect | Status: accepted
Priority: low | Milestone:
Component: wxOSX-Cocoa | Version: 2.9-svn
Keywords: | Blockedby:
Patch: 1 | Blocking:
-------------------------------+--------------------------------------------
Changes (by csomor):

* owner: => csomor
* status: new => accepted



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

wxTrac

unread,
Jul 13, 2012, 2:51:06 AM7/13/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/14482#comment:2>

#14482: Inconsistencies in NSColor usage creates a GUI bug for users with
specialized Display Settings
--------------------------------+-------------------------------------------
Reporter: kjones@… | Owner: csomor
Type: defect | Status: closed
Priority: low | Milestone:
Component: wxOSX-Cocoa | Version: 2.9-svn
Resolution: fixed | Keywords:
Blockedby: | Patch: 1
Blocking: |
--------------------------------+-------------------------------------------
Changes (by SC):

* status: accepted => closed
* resolution: => fixed


Comment:

(In [72065]) always use calibrated colors, fixes #14482


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