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

@ -2,8 +2,6 @@
#include <QtWidgets>
#include "theme_manager.h"
PageLabelWidget::PageLabelWidget(QWidget *parent)
: QWidget(parent)
{
@ -111,9 +109,9 @@ void PageLabelWidget::updatePosition()
move(QPoint((parent->geometry().size().width() - this->width()), -this->height()));
}
void PageLabelWidget::applyTheme()
void PageLabelWidget::applyTheme(const Theme &theme)
{
const auto viewerTheme = ThemeManager::instance().getCurrentTheme().viewer;
const auto viewerTheme = theme.viewer;
infoBackgroundColor = viewerTheme.infoBackgroundColor;