diff options
author | Colomban Wendling <ban@herbesfolles.org> | 2015-06-03 14:08:02 +0200 |
---|---|---|
committer | Colomban Wendling <ban@herbesfolles.org> | 2015-06-03 14:08:02 +0200 |
commit | 3fd7f2bdc3eed77daabd3700e55f5ff744f2bdbe (patch) | |
tree | 03775492f3c7968838f53606156d7509da165014 | |
parent | 35e3460525490f62549bf1263a95374e13d11b7b (diff) | |
download | scintilla-mirror-3fd7f2bdc3eed77daabd3700e55f5ff744f2bdbe.tar.gz |
GTK: Use the proper GTK3 way to set widget window background
It also drops use of gtk_style_context_get_background_color() that has
been deprecated in 3.16.
This however has no functional changes.
-rw-r--r-- | gtk/ScintillaGTK.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 40bcedfa4..d32c660a0 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -482,12 +482,8 @@ void ScintillaGTK::RealizeThis(GtkWidget *widget) { gtk_widget_set_window(widget, gdk_window_new(gtk_widget_get_parent_window(widget), &attrs, GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_CURSOR)); gdk_window_set_user_data(gtk_widget_get_window(widget), widget); - GtkStyleContext *styleContext = gtk_widget_get_style_context(widget); - if (styleContext) { - GdkRGBA colourBackWidget; - gtk_style_context_get_background_color(styleContext, GTK_STATE_FLAG_NORMAL, &colourBackWidget); - gdk_window_set_background_rgba(gtk_widget_get_window(widget), &colourBackWidget); - } + gtk_style_context_set_background(gtk_widget_get_style_context(widget), + gtk_widget_get_window(widget)); gdk_window_show(gtk_widget_get_window(widget)); UnRefCursor(cursor); #else |