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>
This commit is contained in:
parent
f18dc91da5
commit
79ae2b3963
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user