OLED Theme (#2530)

* OLED Theme

* improve check box & text box visibility

* clang format

---------

Co-authored-by: smiRaphi <neogt404@gmail.com>
This commit is contained in:
smiRaphi 2025-02-26 16:53:46 +01:00 committed by GitHub
parent 927f398658
commit 63b50ff92c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 46 additions and 1 deletions

View file

@ -130,6 +130,7 @@ void MainWindow::CreateActions() {
m_theme_act_group->addAction(ui->setThemeViolet);
m_theme_act_group->addAction(ui->setThemeGruvbox);
m_theme_act_group->addAction(ui->setThemeTokyoNight);
m_theme_act_group->addAction(ui->setThemeOled);
}
void MainWindow::AddUiWidgets() {
@ -651,6 +652,14 @@ void MainWindow::CreateConnects() {
isIconBlack = false;
}
});
connect(ui->setThemeOled, &QAction::triggered, &m_window_themes, [this]() {
m_window_themes.SetWindowTheme(Theme::Oled, ui->mw_searchbar);
Config::setMainWindowTheme(static_cast<int>(Theme::Oled));
if (isIconBlack) {
SetUiIcons(false);
isIconBlack = false;
}
});
}
void MainWindow::StartGame() {
@ -1098,6 +1107,11 @@ void MainWindow::SetLastUsedTheme() {
isIconBlack = false;
SetUiIcons(false);
break;
case Theme::Oled:
ui->setThemeOled->setChecked(true);
isIconBlack = false;
SetUiIcons(false);
break;
}
}