forked from qt-creator/qt-creator
Core: Fix compiler warning in ProgressBar
m_cancelRect is a QRect (not a QRectF) Change-Id: I301f5957284ffe66c94067adc64763878ef1b37f Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
@@ -333,7 +333,7 @@ void ProgressBar::paintEvent(QPaintEvent *)
|
|||||||
if (value() < maximum() && !m_error) {
|
if (value() < maximum() && !m_error) {
|
||||||
m_cancelRect = QRect(rect.adjusted(rect.width() - CANCELBUTTON_WIDTH + 2, 1, 0, 0));
|
m_cancelRect = QRect(rect.adjusted(rect.width() - CANCELBUTTON_WIDTH + 2, 1, 0, 0));
|
||||||
const bool hover = m_cancelRect.contains(mapFromGlobal(QCursor::pos()));
|
const bool hover = m_cancelRect.contains(mapFromGlobal(QCursor::pos()));
|
||||||
const QRectF cancelVisualRect(m_cancelRect.adjusted(.5, 1.5, -2.5, -2.5));
|
const QRectF cancelVisualRect(m_cancelRect.adjusted(0, 1, -2, -2));
|
||||||
QLinearGradient grad(cancelVisualRect.topLeft(), cancelVisualRect.bottomLeft());
|
QLinearGradient grad(cancelVisualRect.topLeft(), cancelVisualRect.bottomLeft());
|
||||||
int intensity = hover ? 90 : 70;
|
int intensity = hover ? 90 : 70;
|
||||||
QColor buttonColor(intensity, intensity, intensity, 255);
|
QColor buttonColor(intensity, intensity, intensity, 255);
|
||||||
|
|||||||
Reference in New Issue
Block a user