[gimp/gtk3-port: 113/234] app: port GimpPanedBox to GtkStyleContext
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 113/234] app: port GimpPanedBox to GtkStyleContext
- Date: Sun, 5 Mar 2017 17:08:42 +0000 (UTC)
commit ee3d3ef2e9cad1e034eeb3b0e30557d665fbb345
Author: Michael Natterer <mitch gimp org>
Date: Sat Dec 18 23:31:51 2010 +0100
app: port GimpPanedBox to GtkStyleContext
app/widgets/gimppanedbox.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/app/widgets/gimppanedbox.c b/app/widgets/gimppanedbox.c
index 5317965..ee3c367 100644
--- a/app/widgets/gimppanedbox.c
+++ b/app/widgets/gimppanedbox.c
@@ -280,9 +280,10 @@ gimp_paned_box_position_drop_indicator (GimpPanedBox *paned_box,
/* Create or move the GdkWindow in place */
if (! paned_box->p->dnd_window)
{
- GtkStyle *style = gtk_widget_get_style (widget);
- GtkAllocation allocation;
- GdkWindowAttr attributes;
+ GtkStyleContext *style = gtk_widget_get_style_context (widget);
+ GtkAllocation allocation;
+ GdkWindowAttr attributes;
+ GdkRGBA color;
gtk_widget_get_allocation (widget, &allocation);
@@ -299,8 +300,9 @@ gimp_paned_box_position_drop_indicator (GimpPanedBox *paned_box,
GDK_WA_X | GDK_WA_Y);
gdk_window_set_user_data (paned_box->p->dnd_window, widget);
- gdk_window_set_background (paned_box->p->dnd_window,
- &style->bg[GTK_STATE_SELECTED]);
+ gtk_style_context_get_background_color (style, GTK_STATE_FLAG_SELECTED,
+ &color);
+ gdk_window_set_background_rgba (paned_box->p->dnd_window, &color);
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]