[gimp/gtk3-port: 184/224] app: port GimpOverlayFrame to GtkStyleContext
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 184/224] app: port GimpOverlayFrame to GtkStyleContext
- Date: Sun, 6 Feb 2011 13:15:37 +0000 (UTC)
commit 01583aa7bf0da47b29856a2798247c60e23246e4
Author: Michael Natterer <mitch gimp org>
Date: Wed Dec 29 15:53:15 2010 +0100
app: port GimpOverlayFrame to GtkStyleContext
app/widgets/gimpoverlayframe.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/app/widgets/gimpoverlayframe.c b/app/widgets/gimpoverlayframe.c
index ecd4cec..f68a410 100644
--- a/app/widgets/gimpoverlayframe.c
+++ b/app/widgets/gimpoverlayframe.c
@@ -130,8 +130,9 @@ static gboolean
gimp_overlay_frame_draw (GtkWidget *widget,
cairo_t *cr)
{
- GtkStyle *style = gtk_widget_get_style (widget);
- gboolean rgba;
+ GtkStyleContext *style = gtk_widget_get_style_context (widget);
+ GdkRGBA color;
+ gboolean rgba;
rgba = gdk_screen_get_rgba_visual (gtk_widget_get_screen (widget)) != NULL;
@@ -142,7 +143,10 @@ gimp_overlay_frame_draw (GtkWidget *widget,
}
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
- gdk_cairo_set_source_color (cr, &style->bg[GTK_STATE_NORMAL]);
+ gtk_style_context_get_background_color (style,
+ gtk_widget_get_state_flags (widget),
+ &color);
+ gdk_cairo_set_source_rgba (cr, &color);
if (rgba)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]