From b9277431a8a0d473ca3fc682877c681c1ec0d9b5 Mon Sep 17 00:00:00 2001 From: James Larcombe Date: Tue, 25 May 2010 15:44:58 +0100 Subject: [PATCH] Fixed indeterminate progress bars in Vista style. The animation was never being set up because the value had to be strictly less than zero, which is forbidden by the QProgressBar setters. --- src/gui/styles/qwindowsvistastyle.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/gui/styles/qwindowsvistastyle.cpp b/src/gui/styles/qwindowsvistastyle.cpp index 67a7b85..1fa5efa 100644 --- a/src/gui/styles/qwindowsvistastyle.cpp +++ b/src/gui/styles/qwindowsvistastyle.cpp @@ -1078,7 +1078,7 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption if (const QProgressBar *progressbar = qobject_cast(widget)) { if (((progressbar->value() > 0 && d->transitionsEnabled()) || isIndeterminate)) { - if (!d->widgetAnimation(progressbar) && progressbar->value() < progressbar->maximum()) { + if (!d->widgetAnimation(progressbar) && (progressbar->value() < progressbar->maximum() || isIndeterminate)) { QWindowsVistaAnimation *a = new QWindowsVistaAnimation; a->setWidget(const_cast(widget)); a->setStartTime(QTime::currentTime()); -- 1.7.0.2.msysgit.0