diff src/gui/dialog/settings/application.cc @ 102:b315f3759c56

*: big patch 1. use a wrapper for mINI that enables case sensitivity (personal preference) 2. rename dark_theme.cc to theme.cc and change it to be a class 3. include the "dep" folder so we don't have stupidity in json.h or ini.h 4. I think the graph was also tweaked a lot in this, nothing is constexpr and size is found at runtime...
author Paper <mrpapersonic@gmail.com>
date Fri, 03 Nov 2023 21:32:52 -0400
parents c537996cf67b
children 6d8da6e64d61
line wrap: on
line diff
--- a/src/gui/dialog/settings/application.cc	Fri Nov 03 14:06:02 2023 -0400
+++ b/src/gui/dialog/settings/application.cc	Fri Nov 03 21:32:52 2023 -0400
@@ -1,6 +1,6 @@
 #include "core/session.h"
 #include "gui/dialog/settings.h"
-#include "gui/dark_theme.h"
+#include "gui/theme.h"
 #include <QCheckBox>
 #include <QComboBox>
 #include <QGroupBox>
@@ -123,13 +123,12 @@
 	session.config.anime_list.highlight_anime_if_available = highlight_anime_if_available;
 	session.config.anime_list.display_aired_episodes = display_aired_episodes;
 	session.config.anime_list.display_available_episodes = display_available_episodes;
-	session.config.theme = theme;
-	DarkTheme::SetTheme(session.config.theme);
+	session.config.theme.SetTheme(theme);
 }
 
 SettingsPageApplication::SettingsPageApplication(QWidget* parent) : SettingsPage(parent, tr("Application")) {
 	language = session.config.anime_list.language;
-	theme = session.config.theme;
+	theme = session.config.theme.GetTheme();
 	highlighted_anime_above_others = session.config.anime_list.highlighted_anime_above_others;
 	highlight_anime_if_available = session.config.anime_list.highlight_anime_if_available;
 	display_aired_episodes = session.config.anime_list.display_aired_episodes;