Make Themable pass the current Theme through applyTheme

This reduces boilerplate code and remove the ThemeManager dependency at Thamable subclasses level.
This commit is contained in:
luisangelsm
2026-01-20 15:57:22 +01:00
parent b662e4975b
commit edd5bbc69c
33 changed files with 55 additions and 77 deletions

View File

@ -18,7 +18,6 @@
#include "yacreader_global.h"
#include "edit_shortcuts_dialog.h"
#include "shortcuts_manager.h"
#include "theme_manager.h"
#include "whats_new_controller.h"
@ -1556,9 +1555,9 @@ void MainWindowViewer::setLoadedComicActionsEnabled(bool enabled)
a->setEnabled(enabled);
}
void MainWindowViewer::applyTheme()
void MainWindowViewer::applyTheme(const Theme &theme)
{
const auto toolbarTheme = ThemeManager::instance().getCurrentTheme().toolbar;
const auto toolbarTheme = theme.toolbar;
if (comicToolBar) {
comicToolBar->setStyleSheet(toolbarTheme.toolbarQSS);