Skip to content

Commit

Permalink
Some minor cleaning up.
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Dec 6, 2017
1 parent 46d8021 commit 5926eef
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/plugins/miscellaneous/Core/src/busywidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,13 +397,14 @@ void BusyWidget::paintEvent(QPaintEvent *pEvent)
Margin = 5
};

painter.translate(0.5*width(), 0.5*height());
painter.translate(width() >> 1, height() >> 1);

QPainterPath painterPath;
int backgroundSize = 2*(mRadius+mLength+Margin);
double backgroundCornerRadius = mBackgroundRoundness*(backgroundSize >> 1);
int halfBackgroundSize = mRadius+mLength+Margin;
int backgroundSize = halfBackgroundSize << 1;
double backgroundCornerRadius = mBackgroundRoundness*halfBackgroundSize;

painterPath.addRoundedRect(QRectF(-0.5*backgroundSize, -0.5*backgroundSize,
painterPath.addRoundedRect(QRectF(-halfBackgroundSize, -halfBackgroundSize,
backgroundSize, backgroundSize),
backgroundCornerRadius, backgroundCornerRadius);

Expand Down

0 comments on commit 5926eef

Please sign in to comment.