diff options
author | Morten Johan Sørvig <morten.sorvig@theqtcompany.com> | 2015-05-13 20:31:30 +0200 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@theqtcompany.com> | 2015-08-06 19:30:41 +0000 |
commit | 79ae2b3963f7356d4931de5fee67f2259ec7f6f9 (patch) | |
tree | 9b5321b7b85729f17de0769a28ce6989b4073fa5 /src/widgets | |
parent | f18dc91da5924256de54cfe05ca8f75f03a8a829 (diff) |
QMacStyle: Disable progress bar animations
Disable progress bar animations on 10.10 Yosemite
and higher - the native style does not animate them
any more. Keep the indeterminate progress bar animation.
Change-Id: If15fa0321e184101ef19b1050eb5e9d8f27480d8
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/styles/qmacstyle_mac.mm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index d9238dc9d5..d13754b36b 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -4699,7 +4699,8 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter tdi.value = pb->progress; tdi.attributes = vertical ? 0 : kThemeTrackHorizontal; - if (isIndeterminate || tdi.value < tdi.max) { + const bool usingYosemiteOrLater = QSysInfo::MacintoshVersion > QSysInfo::MV_10_9; + if (isIndeterminate || (tdi.value < tdi.max && !usingYosemiteOrLater)) { if (QProgressStyleAnimation *animation = qobject_cast<QProgressStyleAnimation*>(d->animation(opt->styleObject))) tdi.trackInfo.progress.phase = animation->animationStep(); else if (opt->styleObject) |