Commit f2ee040b authored by Halla Rempt's avatar Halla Rempt
Browse files

BUG:372893 Fix painting of the sliderspinbox

parent 9802e352
......@@ -235,7 +235,7 @@ void KisAbstractSliderSpinBox::paintFusion(QPainter &painter)
int progressIndicatorPos = (progressOpts.progress - qreal(progressOpts.minimum)) / qMax(qreal(1.0),
qreal(progressOpts.maximum) - progressOpts.minimum) * rect.width();
if (progressIndicatorPos >= 0 && progressIndicatorPos <= rect.width() && (progressOpts.progress != 0)) {
if (progressIndicatorPos >= 0 && progressIndicatorPos <= rect.width()) {
leftRect = QRect(rect.left(), rect.top(), progressIndicatorPos, rect.height());
} else if (progressIndicatorPos > rect.width()) {
painter.setPen(palette().highlightedText().color());
......@@ -292,7 +292,7 @@ void KisAbstractSliderSpinBox::paintPlastique(QPainter &painter)
int progressIndicatorPos = (progressOpts.progress - qreal(progressOpts.minimum)) / qMax(qreal(1.0),
qreal(progressOpts.maximum) - progressOpts.minimum) * rect.width();
if (progressIndicatorPos >= 0 && progressIndicatorPos <= rect.width() && (progressOpts.progress != 0)) {
if (progressIndicatorPos >= 0 && progressIndicatorPos <= rect.width()) {
leftRect = QRect(rect.left(), rect.top(), progressIndicatorPos, rect.height());
} else if (progressIndicatorPos > rect.width()) {
painter.setPen(palette().highlightedText().color());
......
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