Add toolbar and background theming to YACReader

This commit is contained in:
luisangelsm
2026-01-14 15:51:32 +01:00
parent b46f34adb1
commit 721da42c8c
20 changed files with 482 additions and 37 deletions

View File

@ -32,7 +32,7 @@ QIcon YACReader::noHighlightedIcon(const QString &path)
return icon;
}
void YACReader::colorize(QImage &img, QColor &col)
void YACReader::colorize(QImage &img, const QColor &col)
{
QRgb *data = (QRgb *)img.bits();
QRgb *end = data + img.width() * img.height();
@ -94,6 +94,9 @@ QAction *YACReader::actionWithCustomIcon(const QIcon &icon, QAction *action)
QObject::connect(a, &QAction::toggled, action, &QAction::setChecked);
QObject::connect(action, &QAction::toggled, a, &QAction::setChecked);
// asign a to action somehow so we can retrieve it later
action->setProperty("customIconAction", QVariant::fromValue<QObject *>(a));
return a;
}