| 376 | } |
| 377 | |
| 378 | void ImportWidget::applyTheme(const Theme &theme) |
| 379 | { |
| 380 | const auto &importTheme = theme.importWidget; |
| 381 | |
| 382 | // Covers toggle button |
| 383 | hideButton->setIcon(importTheme.coversToggleIcon); |
| 384 | hideButton->setIconSize(hideButton->size()); |
| 385 | |
| 386 | // Background |
| 387 | QPalette p(palette()); |
| 388 | p.setColor(QPalette::Window, importTheme.backgroundColor); |
| 389 | setPalette(p); |
| 390 | |
| 391 | // Covers view background |
| 392 | coversView->setStyleSheet(QString("QGraphicsView {background-color: %1; border:none;}") |
| 393 | .arg(importTheme.coversViewBackgroundColor.name())); |
| 394 | |
| 395 | // Covers decorations |
| 396 | topDecorator->setPixmap(importTheme.topCoversDecoration); |
| 397 | topDecorator->setFixedHeight(importTheme.topCoversDecoration.height()); |
| 398 | bottomDecorator->setPixmap(importTheme.bottomCoversDecoration); |
| 399 | bottomDecorator->setFixedHeight(importTheme.bottomCoversDecoration.height()); |
| 400 | |
| 401 | const auto &noLibrariesWidget = theme.noLibrariesWidget; |
| 402 | activityIndicator->setPixmaps(noLibrariesWidget.noLibrariesLinePixmap, importTheme.glowLinePixmap); |
| 403 | |
| 404 | // Apply text colors |
| 405 | updateTextColors(); |
| 406 | } |
| 407 | |
| 408 | void ImportWidget::updateTextColors() |
| 409 | { |