summaryrefslogtreecommitdiff
path: root/eel
diff options
context:
space:
mode:
Diffstat (limited to 'eel')
-rw-r--r--eel/eel-background.c20
-rw-r--r--eel/eel-canvas.c9
-rw-r--r--eel/eel-editable-label.c16
3 files changed, 37 insertions, 8 deletions
diff --git a/eel/eel-background.c b/eel/eel-background.c
index 02b4d857..cb4ac2ae 100644
--- a/eel/eel-background.c
+++ b/eel/eel-background.c
@@ -326,6 +326,7 @@ eel_background_ensure_realized (EelBackground *self)
int width, height;
GdkWindow *window;
GtkStyleContext *style;
+ GdkRGBA *c;
/* Set the default color */
style = gtk_widget_get_style_context (self->details->widget);
@@ -334,9 +335,13 @@ eel_background_ensure_realized (EelBackground *self)
if (self->details->use_base) {
gtk_style_context_add_class (style, GTK_STYLE_CLASS_VIEW);
}
- gtk_style_context_get_background_color (style,
- gtk_style_context_get_state (style),
- &self->details->default_color);
+
+ gtk_style_context_get (style, gtk_style_context_get_state (style),
+ GTK_STYLE_PROPERTY_BACKGROUND_COLOR,
+ &c, NULL);
+ self->details->default_color = *c;
+ gdk_rgba_free (c);
+
gtk_style_context_restore (style);
/* If the window size is the same as last time, don't update */
@@ -1079,7 +1084,14 @@ eel_background_set_dropped_color (EelBackground *self,
GtkStyleContext *style = gtk_widget_get_style_context (widget);
GdkRGBA bg;
- gtk_style_context_get_background_color (style, GTK_STATE_FLAG_NORMAL, &bg);
+ GdkRGBA *c;
+
+ gtk_style_context_get (style, GTK_STATE_FLAG_NORMAL,
+ GTK_STYLE_PROPERTY_BACKGROUND_COLOR,
+ &c, NULL);
+ bg = *c;
+ gdk_rgba_free (c);
+
gradient_spec = gdk_rgba_to_string (&bg);
}
diff --git a/eel/eel-canvas.c b/eel/eel-canvas.c
index 340f25e3..c7e31f3e 100644
--- a/eel/eel-canvas.c
+++ b/eel/eel-canvas.c
@@ -3024,6 +3024,7 @@ eel_canvas_draw_background (EelCanvas *canvas,
cairo_rectangle_int_t rect;
GtkStyleContext *style_context;
GdkRGBA color;
+ GdkRGBA *c;
if (!gdk_cairo_get_clip_rectangle (cr, &rect))
return;
@@ -3031,7 +3032,13 @@ eel_canvas_draw_background (EelCanvas *canvas,
cairo_save (cr);
/* By default, we use the style background. */
style_context = gtk_widget_get_style_context (GTK_WIDGET (canvas));
- gtk_style_context_get_background_color (style_context, GTK_STATE_FLAG_NORMAL, &color);
+
+ gtk_style_context_get (style_context, GTK_STATE_FLAG_NORMAL,
+ GTK_STYLE_PROPERTY_BACKGROUND_COLOR,
+ &c, NULL);
+ color = *c;
+ gdk_rgba_free (c);
+
gdk_cairo_set_source_rgba (cr, &color);
gdk_cairo_rectangle (cr, &rect);
cairo_fill (cr);
diff --git a/eel/eel-editable-label.c b/eel/eel-editable-label.c
index da43cb0e..ec606302 100644
--- a/eel/eel-editable-label.c
+++ b/eel/eel-editable-label.c
@@ -1517,6 +1517,7 @@ eel_editable_label_draw_cursor (EelEditableLabel *label, cairo_t *cr, gint xoff
if (!block_at_line_end)
{
GdkRGBA color;
+ GdkRGBA *c;
clip = gdk_pango_layout_get_clip_region (label->layout,
xoffset, yoffset,
@@ -1525,8 +1526,11 @@ eel_editable_label_draw_cursor (EelEditableLabel *label, cairo_t *cr, gint xoff
gdk_cairo_region (cr, clip);
cairo_clip (cr);
- gtk_style_context_get_background_color (context, GTK_STATE_FLAG_FOCUSED,
- &color);
+ gtk_style_context_get (context, GTK_STATE_FLAG_FOCUSED,
+ GTK_STYLE_PROPERTY_BACKGROUND_COLOR,
+ &c, NULL);
+ color = *c;
+ gdk_rgba_free (c);
gdk_cairo_set_source_rgba (cr,
&color);
@@ -1580,6 +1584,7 @@ eel_editable_label_draw (GtkWidget *widget,
GtkStateType state;
GdkRGBA background_color;
+ GdkRGBA *c;
range[0] = label->selection_anchor;
range[1] = label->selection_end;
@@ -1612,7 +1617,12 @@ eel_editable_label_draw (GtkWidget *widget,
state = gtk_widget_get_state_flags (widget);
state |= GTK_STATE_FLAG_SELECTED;
- gtk_style_context_get_background_color (style, state, &background_color);
+ gtk_style_context_get (style, state,
+ GTK_STYLE_PROPERTY_BACKGROUND_COLOR,
+ &c, NULL);
+ background_color = *c;
+ gdk_rgba_free (c);
+
gdk_cairo_set_source_rgba (cr, &background_color);
cairo_paint (cr);