Mercurial > minori
diff src/gui/dialog/settings/application.cc @ 258:862d0d8619f6
*: HUUUGE changes
animia has been renamed to animone, so instead of thinking of a
health condition, you think of a beautiful flower :)
I've also edited some of the code for animone, but I have no idea
if it even works or not because I don't have a mac or windows
machine lying around. whoops!
... anyway, all of the changes divergent from Anisthesia are now
licensed under BSD. it's possible that I could even rewrite most
of the code to where I don't even have to keep the MIT license,
but that's thinking too far into the future
I've been slacking off on implementing the anime seasons page,
mostly out of laziness. I think I'd have to create another db file
specifically for the seasons
anyway, this code is being pushed *primarily* because the hard drive
it's on is failing! yay :)
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Mon, 01 Apr 2024 02:43:44 -0400 |
parents | ff0061e75f0f |
children | 657fda1b9cac |
line wrap: on
line diff
--- a/src/gui/dialog/settings/application.cc Sun Feb 18 16:02:14 2024 -0500 +++ b/src/gui/dialog/settings/application.cc Mon Apr 01 02:43:44 2024 -0400 @@ -1,8 +1,8 @@ #include "core/session.h" #include "core/strings.h" #include "gui/dialog/settings.h" +#include "gui/locale.h" #include "gui/theme.h" -#include "gui/locale.h" #include "gui/translate/anime.h" #include <QCheckBox> @@ -55,7 +55,7 @@ middle_click_layout->addWidget(mc_combo_box_label); middle_click_layout->addWidget(mc_combo_box); middle_click_layout->setContentsMargins(0, 0, 0, 0); - + actions_layout->addWidget(middle_click_widget); } @@ -98,10 +98,13 @@ QComboBox* rating_combo_box = new QComboBox(appearance_group_box); for (const auto& score_format : Anime::ScoreFormats) - rating_combo_box->addItem(Strings::ToQString(Translate::ToLocalString(score_format)), static_cast<int>(score_format)); + rating_combo_box->addItem(Strings::ToQString(Translate::ToLocalString(score_format)), + static_cast<int>(score_format)); connect(rating_combo_box, QOverload<int>::of(&QComboBox::currentIndexChanged), this, - [this, rating_combo_box](int index) { format = static_cast<Anime::ScoreFormat>(rating_combo_box->itemData(index).toInt()); }); + [this, rating_combo_box](int index) { + format = static_cast<Anime::ScoreFormat>(rating_combo_box->itemData(index).toInt()); + }); rating_combo_box->setCurrentIndex(static_cast<int>(format)); appearance_layout->addWidget(rating_combo_box); @@ -110,7 +113,8 @@ { /* Hopefully I made this easy to parse... */ - QCheckBox* hl_above_anime_box = new QCheckBox(tr("Display highlighted anime above others"), appearance_group_box); + QCheckBox* hl_above_anime_box = + new QCheckBox(tr("Display highlighted anime above others"), appearance_group_box); hl_above_anime_box->setCheckState(highlighted_anime_above_others ? Qt::Checked : Qt::Unchecked); hl_above_anime_box->setEnabled(highlight_anime_if_available); hl_above_anime_box->setContentsMargins(10, 0, 0, 0); @@ -120,7 +124,8 @@ { /* This is here because the above checkbox actually depends on it to be checked. */ - QCheckBox* hl_anime_box = new QCheckBox(tr("Highlight anime if next episode is available in library folders"), appearance_group_box); + QCheckBox* hl_anime_box = new QCheckBox( + tr("Highlight anime if next episode is available in library folders"), appearance_group_box); hl_anime_box->setCheckState(highlight_anime_if_available ? Qt::Checked : Qt::Unchecked); connect(hl_anime_box, &QCheckBox::stateChanged, this, [this, hl_above_anime_box](int state) { @@ -157,7 +162,8 @@ new QCheckBox(tr("Display available episodes in library folders"), progress_group_box); connect(progress_display_available_episodes, &QCheckBox::stateChanged, this, [this](int state) { display_available_episodes = !(state == Qt::Unchecked); }); - progress_display_available_episodes->setCheckState(display_available_episodes ? Qt::Checked : Qt::Unchecked); + progress_display_available_episodes->setCheckState(display_available_episodes ? Qt::Checked + : Qt::Unchecked); progress_layout->addWidget(progress_display_available_episodes); } @@ -196,7 +202,7 @@ theme_combo_box->addItem(tr("Light")); theme_combo_box->addItem(tr("Dark")); connect(theme_combo_box, QOverload<int>::of(&QComboBox::currentIndexChanged), this, - [this](int index) { theme = static_cast<Themes>(index); }); + [this](int index) { theme = static_cast<Themes>(index); }); theme_combo_box->setCurrentIndex(static_cast<int>(theme)); appearance_layout->addWidget(theme_combo_box); } @@ -216,7 +222,7 @@ locale_combo_box->addItem(Strings::ToQString(Locale::GetLocaleFullName(l)), l); connect(locale_combo_box, QOverload<int>::of(&QComboBox::currentIndexChanged), this, - [this, locale_combo_box](int) { locale = locale_combo_box->currentData().toLocale(); }); + [this, locale_combo_box](int) { locale = locale_combo_box->currentData().toLocale(); }); for (size_t i = 0; i < available_locales.size(); i++) if (available_locales[i] == locale) @@ -235,7 +241,6 @@ return result; } - void SettingsPageApplication::SaveInfo() { session.config.anime_list.language = language; session.config.anime_list.highlighted_anime_above_others = highlighted_anime_above_others;