mirror of
https://github.com/YACReader/yacreader
synced 2026-03-01 18:33:09 -05:00
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:
@ -1,16 +1,14 @@
|
||||
#include "scraper_checkbox.h"
|
||||
|
||||
#include "theme_manager.h"
|
||||
|
||||
ScraperCheckBox::ScraperCheckBox(const QString &text, QWidget *parent)
|
||||
: QCheckBox(text, parent)
|
||||
{
|
||||
initTheme(this);
|
||||
}
|
||||
|
||||
void ScraperCheckBox::applyTheme()
|
||||
void ScraperCheckBox::applyTheme(const Theme &theme)
|
||||
{
|
||||
auto comicVineTheme = ThemeManager::instance().getCurrentTheme().comicVine;
|
||||
auto comicVineTheme = theme.comicVine;
|
||||
|
||||
setStyleSheet(comicVineTheme.checkBoxQSS);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user