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

@ -1,6 +1,5 @@
#include "scraper_results_paginator.h"
#include "response_parser.h"
#include "theme_manager.h"
#include <QHBoxLayout>
#include <QLabel>
@ -62,9 +61,9 @@ void ScraperResultsPaginator::setCustomLabel(const QString &label)
customLabel = label;
}
void ScraperResultsPaginator::applyTheme()
void ScraperResultsPaginator::applyTheme(const Theme &theme)
{
auto comicVineTheme = ThemeManager::instance().getCurrentTheme().comicVine;
auto comicVineTheme = theme.comicVine;
numElements->setStyleSheet(comicVineTheme.defaultLabelQSS);
numPages->setStyleSheet(comicVineTheme.defaultLabelQSS);