diff options
Add GtkSettings overwrite on dark-theme
Bug: https://bugs.webkit.org/show_bug.cgi?id=197947
3 files changed, 15 insertions, 3 deletions
| -rw-r--r-- | badwolf.c | 7 | ||||
| -rw-r--r-- | config.h | 6 | ||||
| -rw-r--r-- | keybindings.c | 5 |
@@ -748,6 +748,13 @@ main(int argc, char *argv[]) gtk_init(&argc, &argv); +#ifdef BADWOLF_PREFER_DARK_THEME + g_object_set(gtk_settings_get_default(), + "gtk-application-prefer-dark-theme", + BADWOLF_PREFER_DARK_THEME, + NULL); +#endif + g_fprintf(stderr, _("Running Badwolf version: %s\n"), version); g_fprintf(stderr, _("Buildtime WebKit version: %d.%d.%d\n"), @@ -86,4 +86,10 @@ */ #define BADWOLF_STATUSLABEL_ELLIPSIZE PANGO_ELLIPSIZE_MIDDLE +/* BADWOLF_PREFER_DARK_THEME: Overwrites user GtkSettings for gtk-application-prefer-dark-theme + * Done as a temporary workaround against https://bugs.webkit.org/show_bug.cgi?id=197947 + * Remove definition to keep user settings, should only be done once the bug is fixed. + */ +#define BADWOLF_PREFER_DARK_THEME FALSE + #endif /* CONFIG_H_INCLUDED */ diff --git a/keybindings.c b/keybindings.c index d0126e5..b5e9228 100644 --- a/keybindings.c +++ b/keybindings.c @@ -24,7 +24,7 @@ about_dialogCb_activate_link(GtkAboutDialog *about_dialog, gchar *uri, gpointer static void badwolf_about_dialog(GtkWindow *main_window, gpointer user_data) { - struct Window *window = (struct Window *)user_data; + struct Window *window = (struct Window *)user_data; GtkWidget *about_dialog = gtk_about_dialog_new(); gtk_window_set_transient_for(GTK_WINDOW(about_dialog), main_window); @@ -39,8 +39,7 @@ badwolf_about_dialog(GtkWindow *main_window, gpointer user_data) _("Minimalist and privacy-oriented WebKitGTK+ browser")); gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about_dialog), version); - g_signal_connect( - about_dialog, "activate-link", G_CALLBACK(about_dialogCb_activate_link), window); + g_signal_connect(about_dialog, "activate-link", G_CALLBACK(about_dialogCb_activate_link), window); (void)gtk_dialog_run(GTK_DIALOG(about_dialog)); gtk_widget_destroy(about_dialog); |