diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-07-22 11:56:51 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-07-22 12:02:51 (GMT) |
commit | 27e5a1f9542b03a6930f002e8d7dafd97cf88a1a (patch) | |
tree | ed5dbaaa9a0824ba1910f89db8bf38374b574b58 /src/gui/styles/qgtkstyle.cpp | |
parent | 336954fb9b990c6d7c44ed3a8d676a6e21b2057f (diff) | |
download | Qt-27e5a1f9542b03a6930f002e8d7dafd97cf88a1a.zip Qt-27e5a1f9542b03a6930f002e8d7dafd97cf88a1a.tar.gz Qt-27e5a1f9542b03a6930f002e8d7dafd97cf88a1a.tar.bz2 |
Support for very large range in QProgressBar
Regression since my last commit.
Task-number: 152227
Diffstat (limited to 'src/gui/styles/qgtkstyle.cpp')
-rw-r--r-- | src/gui/styles/qgtkstyle.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index 2ba151e..53f3db9 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -2075,8 +2075,8 @@ void QGtkStyle::drawControl(ControlElement element, } if (vertical) rect = QRect(rect.left(), rect.top(), rect.height(), rect.width()); // flip width and height - const int progressIndicatorPos = (bar->progress - bar->minimum) * rect.width() / - qMax(1, bar->maximum - bar->minimum); + const int progressIndicatorPos = (bar->progress - qreal(bar->minimum)) * rect.width() / + qMax(1.0, qreal(bar->maximum) - bar->minimum); if (progressIndicatorPos >= 0 && progressIndicatorPos <= rect.width()) leftRect = QRect(rect.left(), rect.top(), progressIndicatorPos, rect.height()); if (vertical) |