Commit e9ce7d9f authored by Dmitry Kazakov's avatar Dmitry Kazakov

Fix drawing of progress bars in the layers docker

BUG:407553
BACKPORT:krita/4.2
parent b9b9ddcd
......@@ -976,10 +976,12 @@ void NodeDelegate::drawProgressBar(QPainter *p, const QStyleOptionViewItem &opti
const QRect iconsRectR = iconsRect(option, index);
const int height = 5;
const QRect rc = QRect(
((option.direction == Qt::RightToLeft) ? iconsRectR.bottomRight()
: thumbnailRect.bottomRight()) - QPoint(0, height),
((option.direction == Qt::RightToLeft) ? thumbnailRect.bottomLeft()
: iconsRectR.bottomLeft()));
((option.direction == Qt::RightToLeft) ?
iconsRectR.bottomRight() :
thumbnailRect.bottomRight()) - QPoint(0, height),
((option.direction == Qt::RightToLeft) ?
thumbnailRect.bottomLeft() :
iconsRectR.bottomLeft()));
p->save();
{
......@@ -987,6 +989,7 @@ void NodeDelegate::drawProgressBar(QPainter *p, const QStyleOptionViewItem &opti
QStyle* style = QApplication::style();
QStyleOptionProgressBar opt;
opt.rect = rc;
opt.minimum = 0;
opt.maximum = 100;
opt.progress = value.toInt();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment