comparison 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
comparison
equal deleted inserted replaced
101:c537996cf67b 102:b315f3759c56
1 #include "core/session.h" 1 #include "core/session.h"
2 #include "gui/dialog/settings.h" 2 #include "gui/dialog/settings.h"
3 #include "gui/dark_theme.h" 3 #include "gui/theme.h"
4 #include <QCheckBox> 4 #include <QCheckBox>
5 #include <QComboBox> 5 #include <QComboBox>
6 #include <QGroupBox> 6 #include <QGroupBox>
7 #include <QHBoxLayout> 7 #include <QHBoxLayout>
8 #include <QLabel> 8 #include <QLabel>
121 session.config.anime_list.language = language; 121 session.config.anime_list.language = language;
122 session.config.anime_list.highlighted_anime_above_others = highlighted_anime_above_others; 122 session.config.anime_list.highlighted_anime_above_others = highlighted_anime_above_others;
123 session.config.anime_list.highlight_anime_if_available = highlight_anime_if_available; 123 session.config.anime_list.highlight_anime_if_available = highlight_anime_if_available;
124 session.config.anime_list.display_aired_episodes = display_aired_episodes; 124 session.config.anime_list.display_aired_episodes = display_aired_episodes;
125 session.config.anime_list.display_available_episodes = display_available_episodes; 125 session.config.anime_list.display_available_episodes = display_available_episodes;
126 session.config.theme = theme; 126 session.config.theme.SetTheme(theme);
127 DarkTheme::SetTheme(session.config.theme);
128 } 127 }
129 128
130 SettingsPageApplication::SettingsPageApplication(QWidget* parent) : SettingsPage(parent, tr("Application")) { 129 SettingsPageApplication::SettingsPageApplication(QWidget* parent) : SettingsPage(parent, tr("Application")) {
131 language = session.config.anime_list.language; 130 language = session.config.anime_list.language;
132 theme = session.config.theme; 131 theme = session.config.theme.GetTheme();
133 highlighted_anime_above_others = session.config.anime_list.highlighted_anime_above_others; 132 highlighted_anime_above_others = session.config.anime_list.highlighted_anime_above_others;
134 highlight_anime_if_available = session.config.anime_list.highlight_anime_if_available; 133 highlight_anime_if_available = session.config.anime_list.highlight_anime_if_available;
135 display_aired_episodes = session.config.anime_list.display_aired_episodes; 134 display_aired_episodes = session.config.anime_list.display_aired_episodes;
136 display_available_episodes = session.config.anime_list.display_available_episodes; 135 display_available_episodes = session.config.anime_list.display_available_episodes;
137 AddTab(CreateAnimeListWidget(), tr("Anime list")); 136 AddTab(CreateAnimeListWidget(), tr("Anime list"));