]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed detection of listbox background
authorVáclav Slavík <vslavik@fastmail.fm>
Thu, 17 Feb 2000 15:17:31 +0000 (15:17 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Thu, 17 Feb 2000 15:17:31 +0000 (15:17 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/settings.cpp
src/gtk1/settings.cpp

index 29e3b821f97783fd1def312119b4d4f72e7bc488..658c74ab4e8d846ac4188c83d46a0e04bda29de7 100644 (file)
@@ -164,13 +164,13 @@ wxColour wxSystemSettings::GetSystemColour( int index )
             {
                 GtkWidget *widget = gtk_list_new();
                 GtkStyle *def = gtk_rc_get_style( widget );
-                if (!def)
+                if (!def) 
                     def = gtk_widget_get_default_style();
                 if (def)
                 {
-                    int red = def->bg[GTK_STATE_NORMAL].red;
-                    int green = def->bg[GTK_STATE_NORMAL].green;
-                    int blue = def->bg[GTK_STATE_NORMAL].blue;
+                    int red = def->base[GTK_STATE_NORMAL].red;
+                    int green = def->base[GTK_STATE_NORMAL].green;
+                    int blue = def->base[GTK_STATE_NORMAL].blue;
                     g_systemListBoxColour = 
                            new wxColour( red    >> SHIFT,
                                          green  >> SHIFT,
@@ -179,7 +179,6 @@ wxColour wxSystemSettings::GetSystemColour( int index )
                 else
                     g_systemListBoxColour = new wxColour(*wxWHITE);
                 gtk_widget_destroy( widget );
-
             }
             return *g_systemListBoxColour;
         }
index 29e3b821f97783fd1def312119b4d4f72e7bc488..658c74ab4e8d846ac4188c83d46a0e04bda29de7 100644 (file)
@@ -164,13 +164,13 @@ wxColour wxSystemSettings::GetSystemColour( int index )
             {
                 GtkWidget *widget = gtk_list_new();
                 GtkStyle *def = gtk_rc_get_style( widget );
-                if (!def)
+                if (!def) 
                     def = gtk_widget_get_default_style();
                 if (def)
                 {
-                    int red = def->bg[GTK_STATE_NORMAL].red;
-                    int green = def->bg[GTK_STATE_NORMAL].green;
-                    int blue = def->bg[GTK_STATE_NORMAL].blue;
+                    int red = def->base[GTK_STATE_NORMAL].red;
+                    int green = def->base[GTK_STATE_NORMAL].green;
+                    int blue = def->base[GTK_STATE_NORMAL].blue;
                     g_systemListBoxColour = 
                            new wxColour( red    >> SHIFT,
                                          green  >> SHIFT,
@@ -179,7 +179,6 @@ wxColour wxSystemSettings::GetSystemColour( int index )
                 else
                     g_systemListBoxColour = new wxColour(*wxWHITE);
                 gtk_widget_destroy( widget );
-
             }
             return *g_systemListBoxColour;
         }