@@ -244,6 +244,7 @@ caja_sidebar_title_select_text_color (CajaSidebarTitle *sidebar_title,
244
244
GdkRGBA * light_info_color , * dark_info_color ;
245
245
GtkStyleContext * style ;
246
246
GdkRGBA color ;
247
+ GdkRGBA * c ;
247
248
248
249
g_assert (CAJA_IS_SIDEBAR_TITLE (sidebar_title ));
249
250
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,
276
277
gtk_style_context_get_color (style , GTK_STATE_FLAG_PRELIGHT , & color );
277
278
setup_gc_with_fg (sidebar_title , LABEL_COLOR_PRELIGHT , & color );
278
279
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
+
280
285
setup_gc_with_fg (sidebar_title , LABEL_INFO_COLOR_HIGHLIGHT ,
281
286
eel_gdk_rgba_is_dark (& color ) ? light_info_color : dark_info_color );
282
287
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
+
284
293
setup_gc_with_fg (sidebar_title , LABEL_INFO_COLOR_ACTIVE ,
285
294
eel_gdk_rgba_is_dark (& color ) ? light_info_color : dark_info_color );
286
295
@@ -293,7 +302,11 @@ caja_sidebar_title_select_text_color (CajaSidebarTitle *sidebar_title,
293
302
gtk_style_context_get_color (style , GTK_STATE_FLAG_NORMAL , & color );
294
303
setup_gc_with_fg (sidebar_title , LABEL_COLOR , & color );
295
304
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
+
297
310
setup_gc_with_fg (sidebar_title , LABEL_INFO_COLOR ,
298
311
eel_gdk_rgba_is_dark (& color ) ?
299
312
light_info_color : dark_info_color );
@@ -315,6 +328,7 @@ caja_sidebar_title_select_text_color (CajaSidebarTitle *sidebar_title,
315
328
setup_gc_with_fg (sidebar_title , LABEL_INFO_COLOR , dark_info_color );
316
329
}
317
330
331
+ gdk_rgba_free (c );
318
332
gdk_rgba_free (dark_info_color );
319
333
gdk_rgba_free (light_info_color );
320
334
}
0 commit comments