Extract noLibrariesWidget theme and use themed line assets
Some checks failed
Build / Initialization (push) Has been cancelled
Build / Code Format Validation (push) Has been cancelled
Build / Linux (Qt6) (push) Has been cancelled
Build / Linux (Qt6 + 7zip) (push) Has been cancelled
Build / macOS (Qt6 Universal) (push) Has been cancelled
Build / Windows x64 (Qt6) (push) Has been cancelled
Build / Windows ARM64 (Qt6) (push) Has been cancelled
Build / Docker amd64 Image (push) Has been cancelled
Build / Docker arm64 Image (push) Has been cancelled
Build / Publish Dev Builds (push) Has been cancelled
Build / Publish Release (push) Has been cancelled
Build / Publish YACReader10 Pre-release Builds (push) Has been cancelled

This commit is contained in:
luisangelsm
2026-03-21 20:55:23 +01:00
parent f65fd08e65
commit 2560174a84
14 changed files with 228 additions and 54 deletions

View File

@ -13,9 +13,7 @@ NoLibrariesWidget::NoLibrariesWidget(QWidget *parent)
iconLabel = new QLabel();
QPixmap line(":/images/noLibrariesLine.png");
QLabel *lineLabel = new QLabel();
lineLabel->setPixmap(line);
lineLabel = new QLabel();
text = new QLabel(tr("You don't have any libraries yet"));
text->setStyleSheet("QLabel {font-size:25px;font-weight:bold;}");
@ -75,19 +73,20 @@ NoLibrariesWidget::NoLibrariesWidget(QWidget *parent)
void NoLibrariesWidget::applyTheme(const Theme &theme)
{
auto emptyTheme = theme.emptyContainer;
auto nlwTheme = theme.noLibrariesWidget;
QPalette p(palette());
p.setColor(QPalette::Window, emptyTheme.backgroundColor);
p.setColor(QPalette::Window, nlwTheme.backgroundColor);
setPalette(p);
QPalette textPalette = text->palette();
textPalette.setColor(QPalette::WindowText, emptyTheme.textColor);
textPalette.setColor(QPalette::WindowText, nlwTheme.textColor);
text->setPalette(textPalette);
QPalette descPalette = textDescription->palette();
descPalette.setColor(QPalette::WindowText, emptyTheme.descriptionTextColor);
descPalette.setColor(QPalette::WindowText, nlwTheme.descriptionTextColor);
textDescription->setPalette(descPalette);
iconLabel->setPixmap(emptyTheme.noLibrariesIcon);
iconLabel->setPixmap(nlwTheme.noLibrariesIcon);
lineLabel->setPixmap(nlwTheme.noLibrariesLinePixmap);
}