Request dark theme from GTK when dark mode is requested in settings

upstream-master
Henry Heino 5 years ago committed by Roland Lötscher
parent fffaa72e43
commit 7448364209
  1. 4
      src/gui/MainWindow.cpp

@ -46,12 +46,14 @@ MainWindow::MainWindow(GladeSearchpath* gladeSearchPath, Control* control):
g_object_ref(mainContentWidget);
g_object_ref(sidebarWidget);
GtkSettings* appSettings = gtk_settings_get_default();
g_object_set(appSettings, "gtk-application-prefer-dark-theme", control->getSettings()->isDarkTheme(), NULL);
loadMainCSS(gladeSearchPath, "xournalpp.css");
GtkOverlay* overlay = GTK_OVERLAY(get("mainOverlay"));
this->floatingToolbox = new FloatingToolbox(this, overlay);
for (int i = 0; i < TOOLBAR_DEFINITIONS_LEN; i++) {
GtkWidget* w = get(TOOLBAR_DEFINITIONS[i].guiName);
g_object_ref(w);

Loading…
Cancel
Save