]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/settings.cpp
Update OpenVMS compile support
[wxWidgets.git] / src / gtk / settings.cpp
index 2cbc4b0875390b0d6b079ed4c21a73d7ec96a1c7..cfd73c9bf95ce8139e8e7fba52a3ea260c13bf4a 100644 (file)
@@ -90,6 +90,7 @@ enum wxGtkColourType
 {
     wxGTK_FG,
     wxGTK_BG,
+    wxGTK_TEXT,
     wxGTK_BASE
 };
 
@@ -122,11 +123,11 @@ static bool GetColourFromGTKWidget(GdkColor& gdkColor,
 
         case wxGTK_MENUITEM:
             widget = gtk_menu_item_new();
-            
+            break;
+
         case wxGTK_MENUBAR:
             widget = gtk_menu_bar_new();
             break;
-            
     }
 
     GtkStyle *def = gtk_rc_get_style( widget );
@@ -150,6 +151,10 @@ static bool GetColourFromGTKWidget(GdkColor& gdkColor,
                 gdkColor = def->bg[state];
                 break;
 
+            case wxGTK_TEXT:
+                gdkColor = def->text[state];
+                break;
+
             case wxGTK_BASE:
                 gdkColor = def->base[state];
                 break;
@@ -317,11 +322,12 @@ wxColour wxSystemSettingsNative::GetColour( wxSystemColour index )
         case wxSYS_COLOUR_HIGHLIGHTTEXT:
             if (!gs_objects.m_colHighlightText.Ok())
             {
-                wxColour hclr = GetColour(wxSYS_COLOUR_HIGHLIGHT);
-                if (hclr.Red() > 200 && hclr.Green() > 200 && hclr.Blue() > 200)
-                    gs_objects.m_colHighlightText = *wxBLACK;
-                else
-                    gs_objects.m_colHighlightText = *wxWHITE;
+                gdkColor.red =
+                gdkColor.green =
+                gdkColor.blue = 0;
+                GetColourFromGTKWidget(
+                    gdkColor, wxGTK_BUTTON, GTK_STATE_SELECTED, wxGTK_TEXT);
+                gs_objects.m_colHighlightText = wxColour(gdkColor);
             }
             color = gs_objects.m_colHighlightText;
             break;