]> git.saurik.com Git - wxWidgets.git/commitdiff
On Mac, when selection is drawn in grey (i.e. unfocused), text color needs to be...
authorKevin Ollivier <kevino@theolliviers.com>
Thu, 9 Nov 2006 20:15:18 +0000 (20:15 +0000)
committerKevin Ollivier <kevino@theolliviers.com>
Thu, 9 Nov 2006 20:15:18 +0000 (20:15 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43239 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/listctrl.cpp

index 3ea1dcafb66c50c58a80455417c164279a299303..e5cd552ab06b1afaa82d49aa5743465a72c1484d 100644 (file)
@@ -720,6 +720,11 @@ public:
     {
         return m_hasFocus ? m_highlightBrush : m_highlightUnfocusedBrush;
     }
+    
+    bool HasFocus() const
+    {
+        return m_hasFocus;
+    }
 
 //protected:
     // the array of all line objects for a non virtual list control (for the
@@ -1381,7 +1386,12 @@ bool wxListLineData::SetAttributes(wxDC *dc,
     wxColour colText;
     if ( highlighted )
 #ifdef __WXMAC__
-        colText = *wxWHITE;
+    {
+        if (m_owner->HasFocus())
+            colText = *wxWHITE;
+        else
+            colText = *wxBLACK;
+    }
 #else
         colText = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
 #endif