Initial implementation of theming

This commit is contained in:
luisangelsm
2026-02-19 17:39:22 +01:00
parent ed28c94f66
commit 044176d6b7
303 changed files with 4634 additions and 2119 deletions

View File

@ -1,32 +1,21 @@
#include "comics_view_transition.h"
#include <QVBoxLayout>
#include <QLabel>
#include <QMovie>
#include <QSettings>
#include <QTimer>
#include <QSizePolicy>
#include <QPainter>
#include "yacreader_global.h"
ComicsViewTransition::ComicsViewTransition(QWidget *parent)
: QWidget(parent)
{
#ifdef Y_MAC_UI
setStyleSheet("QWidget {background:#FFFFFF}");
#else
setStyleSheet("QWidget {background:#2A2A2A}");
#endif
initTheme(this);
}
void ComicsViewTransition::applyTheme(const Theme &theme)
{
setStyleSheet(QString("QWidget {background:%1}").arg(theme.defaultContentBackgroundColor.name()));
update();
}
void ComicsViewTransition::paintEvent(QPaintEvent *)
{
QPainter painter(this);
#ifdef Y_MAC_UI
painter.fillRect(0, 0, width(), height(), QColor("#FFFFFF"));
#else
painter.fillRect(0, 0, width(), height(), QColor("#2A2A2A"));
#endif
painter.fillRect(0, 0, width(), height(), theme.defaultContentBackgroundColor);
}