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,7 +1,5 @@
|
||||
#include "scraper_scroll_label.h"
|
||||
|
||||
#include "theme_manager.h"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QDesktopServices>
|
||||
#include <QUrl>
|
||||
@ -41,9 +39,9 @@ void ScraperScrollLabel::openLink(const QString &link)
|
||||
QDesktopServices::openUrl(QUrl("http://www.comicvine.com" + link));
|
||||
}
|
||||
|
||||
void ScraperScrollLabel::applyTheme()
|
||||
void ScraperScrollLabel::applyTheme(const Theme &theme)
|
||||
{
|
||||
auto comicVineTheme = ThemeManager::instance().getCurrentTheme().comicVine;
|
||||
auto comicVineTheme = theme.comicVine;
|
||||
|
||||
textLabel->setStyleSheet(comicVineTheme.scraperScrollLabelTextQSS);
|
||||
setStyleSheet(comicVineTheme.scraperScrollLabelScrollAreaQSS);
|
||||
|
||||
Reference in New Issue
Block a user