Commit 3e927272 authored by Alessandro Portale's avatar Alessandro Portale
Browse files

Core: Fix compiler warning in ProgressBar



m_cancelRect is a QRect (not a QRectF)

Change-Id: I301f5957284ffe66c94067adc64763878ef1b37f
Reviewed-by: default avatarFawzi Mohamed <fawzi.mohamed@digia.com>
parent 28a9dd8f
...@@ -333,7 +333,7 @@ void ProgressBar::paintEvent(QPaintEvent *) ...@@ -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);
......
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