@@ -244,6 +244,7 @@ caja_sidebar_title_select_text_color (CajaSidebarTitle *sidebar_title,
244244 GdkRGBA * light_info_color , * dark_info_color ;
245245 GtkStyleContext * style ;
246246 GdkRGBA color ;
247+ GdkRGBA * c ;
247248
248249 g_assert (CAJA_IS_SIDEBAR_TITLE (sidebar_title ));
249250 g_return_if_fail (gtk_widget_get_realized (GTK_WIDGET (sidebar_title )));
@@ -276,11 +277,19 @@ caja_sidebar_title_select_text_color (CajaSidebarTitle *sidebar_title,
276277 gtk_style_context_get_color (style , GTK_STATE_FLAG_PRELIGHT , & color );
277278 setup_gc_with_fg (sidebar_title , LABEL_COLOR_PRELIGHT , & color );
278279
279- gtk_style_context_get_background_color (style , GTK_STATE_FLAG_SELECTED , & color );
280+ gtk_style_context_get (style , GTK_STATE_FLAG_SELECTED ,
281+ GTK_STYLE_PROPERTY_BACKGROUND_COLOR ,
282+ & c , NULL );
283+ color = * c ;
284+
280285 setup_gc_with_fg (sidebar_title , LABEL_INFO_COLOR_HIGHLIGHT ,
281286 eel_gdk_rgba_is_dark (& color ) ? light_info_color : dark_info_color );
282287
283- gtk_style_context_get_background_color (style , GTK_STATE_FLAG_ACTIVE , & color );
288+ gtk_style_context_get (style , GTK_STATE_FLAG_ACTIVE ,
289+ GTK_STYLE_PROPERTY_BACKGROUND_COLOR ,
290+ & c , NULL );
291+ color = * c ;
292+
284293 setup_gc_with_fg (sidebar_title , LABEL_INFO_COLOR_ACTIVE ,
285294 eel_gdk_rgba_is_dark (& color ) ? light_info_color : dark_info_color );
286295
@@ -293,7 +302,11 @@ caja_sidebar_title_select_text_color (CajaSidebarTitle *sidebar_title,
293302 gtk_style_context_get_color (style , GTK_STATE_FLAG_NORMAL , & color );
294303 setup_gc_with_fg (sidebar_title , LABEL_COLOR , & color );
295304
296- gtk_style_context_get_background_color (style , GTK_STATE_FLAG_NORMAL , & color );
305+ gtk_style_context_get (style , GTK_STATE_FLAG_NORMAL ,
306+ GTK_STYLE_PROPERTY_BACKGROUND_COLOR ,
307+ & color , NULL );
308+ color = * c ;
309+
297310 setup_gc_with_fg (sidebar_title , LABEL_INFO_COLOR ,
298311 eel_gdk_rgba_is_dark (& color ) ?
299312 light_info_color : dark_info_color );
@@ -315,6 +328,7 @@ caja_sidebar_title_select_text_color (CajaSidebarTitle *sidebar_title,
315328 setup_gc_with_fg (sidebar_title , LABEL_INFO_COLOR , dark_info_color );
316329 }
317330
331+ gdk_rgba_free (c );
318332 gdk_rgba_free (dark_info_color );
319333 gdk_rgba_free (light_info_color );
320334}
0 commit comments