From 50bf7ce0c9f8c3ede2d1a02c734beba9d5a0504e Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 15 Sep 2019 13:17:00 +0200 Subject: patch 8.1.2034: dark them of GTK 3 not supported Problem: Dark them of GTK 3 not supported. Solution: Add the "d" flag in 'guioptions'. (Jonathan Conder, closes #4934) --- src/gui_gtk_x11.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/gui_gtk_x11.c') diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c index 4940b87e2e..1bf836fce1 100644 --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -3130,6 +3130,19 @@ update_window_manager_hints(int force_width, int force_height) } } +#if defined(FEAT_GUI_DARKTHEME) || defined(PROTO) + void +gui_mch_set_dark_theme(int dark) +{ +# if GTK_CHECK_VERSION(3,0,0) + GtkSettings *gtk_settings; + + gtk_settings = gtk_settings_get_for_screen(gdk_screen_get_default()); + g_object_set(gtk_settings, "gtk-application-prefer-dark-theme", (gboolean)dark, NULL); +# endif +} +#endif /* FEAT_GUI_DARKTHEME */ + #ifdef FEAT_TOOLBAR /* -- cgit v1.2.3