@@ -23,6 +23,8 @@ class YACReaderActivityIndicatorWidget : public QWidget
2323{
2424public:
2525 YACReaderActivityIndicatorWidget (QWidget *parent = 0 );
26+ void setPixmaps (const QPixmap &normalLine, const QPixmap &glowLine);
27+
2628public slots:
2729
2830private:
@@ -31,16 +33,11 @@ public slots:
3133};
3234
3335YACReaderActivityIndicatorWidget::YACReaderActivityIndicatorWidget (QWidget *parent)
34- : QWidget(parent)
36+ : QWidget(parent), normal( nullptr ), glow( nullptr )
3537{
36- QPixmap line (" :/images/noLibrariesLine.png" );
37- QPixmap glowLine (" :/images/glowLine.png" );
3838 normal = new QLabel (this );
3939 glow = new QLabel (this );
4040
41- normal->setPixmap (line);
42- glow->setPixmap (glowLine);
43-
4441 auto layout = new QHBoxLayout ();
4542
4643 layout->addWidget (normal, 0 , Qt::AlignVCenter);
@@ -50,11 +47,6 @@ YACReaderActivityIndicatorWidget::YACReaderActivityIndicatorWidget(QWidget *pare
5047 layout->setContentsMargins (4 , 4 , 4 , 4 );
5148 layout->setSpacing (0 );
5249
53- // setFixedHeight(3);
54- // resize(579,3);
55- glow->setGeometry (4 , 4 , glowLine.width (), glowLine.height ());
56- // normal->setGeometry(0,1,579,1);
57-
5850 auto effect = new QGraphicsOpacityEffect ();
5951 // effect->setOpacity(1.0);
6052
@@ -80,6 +72,13 @@ YACReaderActivityIndicatorWidget::YACReaderActivityIndicatorWidget(QWidget *pare
8072 animation->start ();
8173}
8274
75+ void YACReaderActivityIndicatorWidget::setPixmaps (const QPixmap &normalLine, const QPixmap &glowLine)
76+ {
77+ normal->setPixmap (normalLine);
78+ glow->setPixmap (glowLine);
79+ glow->setGeometry (4 , 4 , glowLine.width (), glowLine.height ());
80+ }
81+
8382ImportWidget::ImportWidget (QWidget *parent)
8483 : QWidget(parent)
8584{
@@ -88,7 +87,7 @@ ImportWidget::ImportWidget(QWidget *parent)
8887
8988 iconLabel = new QLabel ();
9089
91- auto activityIndicator = new YACReaderActivityIndicatorWidget ();
90+ activityIndicator = new YACReaderActivityIndicatorWidget ();
9291
9392 text = new QLabel ();
9493 textDescription = new QLabel ();
@@ -399,6 +398,9 @@ void ImportWidget::applyTheme(const Theme &theme)
399398 bottomDecorator->setPixmap (importTheme.bottomCoversDecoration );
400399 bottomDecorator->setFixedHeight (importTheme.bottomCoversDecoration .height ());
401400
401+ const auto &noLibrariesWidget = theme.noLibrariesWidget ;
402+ activityIndicator->setPixmaps (noLibrariesWidget.noLibrariesLinePixmap , importTheme.glowLinePixmap );
403+
402404 // Apply text colors
403405 updateTextColors ();
404406}
0 commit comments