diff options
author | Joerg Bornemann <joerg.bornemann@nokia.com> | 2010-03-01 12:04:48 (GMT) |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@nokia.com> | 2010-03-01 12:14:51 (GMT) |
commit | 334ed757857d14e075630644495540fb70a3aaae (patch) | |
tree | b2d56bde41f55f2415e2b3521de537270ded1c6f | |
parent | fe7c8626af168ca29fd74930b9baa16c6dacdc30 (diff) | |
download | Qt-334ed757857d14e075630644495540fb70a3aaae.zip Qt-334ed757857d14e075630644495540fb70a3aaae.tar.gz Qt-334ed757857d14e075630644495540fb70a3aaae.tar.bz2 |
fix bad performance penalty for tab widgets for Windows mobile 6.5
Task-number: QTBUG-8419
Reviewed-by: thartman
-rw-r--r-- | src/gui/styles/qwindowsmobilestyle.cpp | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/src/gui/styles/qwindowsmobilestyle.cpp b/src/gui/styles/qwindowsmobilestyle.cpp index a264b1b..6e77409 100644 --- a/src/gui/styles/qwindowsmobilestyle.cpp +++ b/src/gui/styles/qwindowsmobilestyle.cpp @@ -4040,25 +4040,26 @@ enum QSliderDirection { SliderUp, SliderDown, SliderLeft, SliderRight }; void QWindowsMobileStylePrivate::tintImagesButton(QColor color) { - if (currentTintButton == color) + if (currentTintButton == color) return; - - imageTabEnd = QImage(tabend_xpm); - imageTabSelectedEnd = QImage(tabselectedend_xpm); - imageTabSelectedBegin = QImage(tabselectedbeginn_xpm); - imageTabMiddle = QImage(tabmiddle_xpm); - tintImage(&imageTabEnd, color, 0.0); - tintImage(&imageTabSelectedEnd, color, 0.0); - tintImage(&imageTabSelectedBegin, color, 0.0); - tintImage(&imageTabMiddle, color, 0.0); - - if (!doubleControls) { - int height = imageTabMiddle.height() / 2 + 1; - imageTabEnd = imageTabEnd.scaledToHeight(height); - imageTabMiddle = imageTabMiddle.scaledToHeight(height); - imageTabSelectedEnd = imageTabSelectedEnd.scaledToHeight(height); - imageTabSelectedBegin = imageTabSelectedBegin.scaledToHeight(height); - } + currentTintButton = color; + + imageTabEnd = QImage(tabend_xpm); + imageTabSelectedEnd = QImage(tabselectedend_xpm); + imageTabSelectedBegin = QImage(tabselectedbeginn_xpm); + imageTabMiddle = QImage(tabmiddle_xpm); + tintImage(&imageTabEnd, color, 0.0); + tintImage(&imageTabSelectedEnd, color, 0.0); + tintImage(&imageTabSelectedBegin, color, 0.0); + tintImage(&imageTabMiddle, color, 0.0); + + if (!doubleControls) { + int height = imageTabMiddle.height() / 2 + 1; + imageTabEnd = imageTabEnd.scaledToHeight(height); + imageTabMiddle = imageTabMiddle.scaledToHeight(height); + imageTabSelectedEnd = imageTabSelectedEnd.scaledToHeight(height); + imageTabSelectedBegin = imageTabSelectedBegin.scaledToHeight(height); + } } void QWindowsMobileStylePrivate::tintImagesHigh(QColor color) |