forked from qt-creator/qt-creator
Fixes: Fix red color on error for progressbars
This commit is contained in:
@@ -149,9 +149,8 @@ void ProgressBar::paintEvent(QPaintEvent *)
|
|||||||
QRect inner = rect.adjusted(2, 2, -1, -1);
|
QRect inner = rect.adjusted(2, 2, -1, -1);
|
||||||
inner.adjust(0, 0, qRound((percent - 1) * inner.width()), 0);
|
inner.adjust(0, 0, qRound((percent - 1) * inner.width()), 0);
|
||||||
if (m_error) {
|
if (m_error) {
|
||||||
// TODO this is not fancy enough
|
QColor red(255, 60, 0, 210);
|
||||||
QColor red(255, 0, 0, 180);
|
c = red;
|
||||||
p.setBrush(red);
|
|
||||||
// avoid too small red bar
|
// avoid too small red bar
|
||||||
if (inner.width() < 10)
|
if (inner.width() < 10)
|
||||||
inner.adjust(0, 0, 10 - inner.width(), 0);
|
inner.adjust(0, 0, 10 - inner.width(), 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user