[Xfce4-commits] [xfce/thunar] 01/01: replaced gtk3 deprecation "gdk_cairo_set_source_color" by "gdk_cairo_set_source_rgba"

noreply at xfce.org noreply at xfce.org
Mon Nov 20 10:33:49 CET 2017


This is an automated email from the git hooks/post-receive script.

a   l   e   x       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/thunar.

commit 2676fd9ab72674b4179e3e887f3cfe21749dd417
Author: Alexander Schwinn <acs82 at gmx.de>
Date:   Mon Nov 20 10:32:52 2017 +0100

    replaced gtk3 deprecation "gdk_cairo_set_source_color"
    by "gdk_cairo_set_source_rgba"
---
 thunar/thunar-icon-renderer.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/thunar/thunar-icon-renderer.c b/thunar/thunar-icon-renderer.c
index 1561dc7..b0338d2 100644
--- a/thunar/thunar-icon-renderer.c
+++ b/thunar/thunar-icon-renderer.c
@@ -298,19 +298,21 @@ thunar_icon_renderer_get_preferred_height (GtkCellRenderer *renderer,
 
 
 
-
 static void
 thunar_icon_renderer_color_selected (cairo_t   *cr,
                                      GtkWidget *widget)
 {
   cairo_pattern_t *source;
-  GtkStateType     state;
+  GtkStateFlags    state;
+  GdkRGBA          color;
+  GtkStyleContext *context = gtk_widget_get_style_context (widget);
 
   cairo_save (cr);
 
   source = cairo_pattern_reference (cairo_get_source (cr));
-  state = gtk_widget_has_focus (widget) ? GTK_STATE_SELECTED : GTK_STATE_ACTIVE;
-  gdk_cairo_set_source_color (cr, &gtk_widget_get_style (widget)->base[state]);
+  state = gtk_widget_has_focus (widget) ? GTK_STATE_FLAG_SELECTED : GTK_STATE_FLAG_ACTIVE;
+  gtk_style_context_get (context, state, GTK_STYLE_PROPERTY_BACKGROUND_COLOR, &color, NULL);
+  gdk_cairo_set_source_rgba (cr, &color);
   cairo_set_operator (cr, CAIRO_OPERATOR_MULTIPLY);
 
   cairo_mask (cr, source);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list