mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 04:54:29 -04:00
Make BusyIndicator size configurable
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user