Skip to content

Commit 078d0b1

Browse files
committed
term-screen: avoid deprecated 'gtk_style_context_get_background_color'
1 parent 7708278 commit 078d0b1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/terminal-screen.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,7 @@ update_color_scheme (TerminalScreen *screen)
10711071
const gchar *bg_image_file;
10721072
double bg_alpha = 1.0;
10731073
GdkRGBA fg, bg;
1074+
GdkRGBA *c;
10741075
guint n_colors;
10751076
GtkStyleContext *context;
10761077
GError *error = NULL;
@@ -1079,7 +1080,13 @@ update_color_scheme (TerminalScreen *screen)
10791080
gtk_style_context_save (context);
10801081
gtk_style_context_set_state (context, GTK_STATE_FLAG_NORMAL);
10811082
gtk_style_context_get_color (context, GTK_STATE_FLAG_NORMAL, &fg);
1082-
gtk_style_context_get_background_color (context, GTK_STATE_FLAG_NORMAL, &bg);
1083+
1084+
gtk_style_context_get (context, GTK_STATE_FLAG_NORMAL,
1085+
GTK_STYLE_PROPERTY_BACKGROUND_COLOR,
1086+
&c, NULL);
1087+
bg = *c;
1088+
gdk_rgba_free (c);
1089+
10831090
gtk_style_context_restore (context);
10841091

10851092
bold_rgba = NULL;

0 commit comments

Comments
 (0)