diff --git a/custom_widgets/yacreader_busy_widget.cpp b/custom_widgets/yacreader_busy_widget.cpp index 9b86df33..a4cb77f4 100644 --- a/custom_widgets/yacreader_busy_widget.cpp +++ b/custom_widgets/yacreader_busy_widget.cpp @@ -23,10 +23,11 @@ void YACReaderBusyWidget::paintEvent(QPaintEvent *event) painter.drawPixmap(0, 0, width(), height(), QPixmap(":/images/busy_background.png")); } -BusyIndicator::BusyIndicator(QWidget *parent) +BusyIndicator::BusyIndicator(QWidget *parent, int size) : QWidget(parent), startAngle(0), - m_style(StyleArc) + m_style(StyleArc), + size(size) { QSizePolicy policy(QSizePolicy::Preferred, QSizePolicy::Fixed); policy.setHeightForWidth(true); @@ -177,10 +178,10 @@ void BusyIndicator::paintEvent(QPaintEvent *) QSize BusyIndicator::minimumSizeHint() const { - return QSize(30, 30); + return QSize(size, size); } QSize BusyIndicator::sizeHint() const { - return QSize(30, 30); + return QSize(size, size); } diff --git a/custom_widgets/yacreader_busy_widget.h b/custom_widgets/yacreader_busy_widget.h index 0b6cd5de..83a32c27 100644 --- a/custom_widgets/yacreader_busy_widget.h +++ b/custom_widgets/yacreader_busy_widget.h @@ -20,7 +20,7 @@ public: StyleEllipse, StyleArc }; - explicit BusyIndicator(QWidget *parent = 0); + explicit BusyIndicator(QWidget *parent = 0, int size = 30); void paintEvent(QPaintEvent *); QSize minimumSizeHint() const; @@ -47,6 +47,7 @@ private: IndicatorStyle m_style; QColor fillColor; + int size; }; #endif // BUSYINDICATOR_H