- GtkWidget *widget = gtk_button_new();
- GtkStyle *def = gtk_rc_get_style( widget );
- if (!def)
- def = gtk_widget_get_default_style();
- if (def)
- {
- int red = def->fg[GTK_STATE_NORMAL].red;
- int green = def->fg[GTK_STATE_NORMAL].green;
- int blue = def->fg[GTK_STATE_NORMAL].blue;
- g_systemBtnTextColour =
- new wxColour( red >> SHIFT,
- green >> SHIFT,
- blue >> SHIFT );
- }
- else
+ int red, green, blue;
+ if ( !GetColourFromGTKWidget(red, green, blue,
+ wxGTK_BUTTON,
+ GTK_STATE_NORMAL,
+ wxGTK_FG) )