summaryrefslogtreecommitdiffstats
path: root/src/plugins/styles
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@qt.io>2017-05-17 15:34:48 -0700
committerGabriel de Dietrich <gabriel.dedietrich@qt.io>2017-06-01 17:56:24 +0000
commit0e3d6214df0ccc3f181c97ccd27cc93e428688ae (patch)
tree5d91796545565d3a6080aa9793b7ea7eb8aaae28 /src/plugins/styles
parent83cbb314609250131d45b14678bbefda8b76bcb1 (diff)
QStyleAnimation: Go down to 15 fps
The new implementation of CE_ProgressBarContents in QMacStyle uses NSProgressIndicator, which is noticeably heavier than the previously used HITheme API. Setting the animation frame rate to 20 fps improves things significantly compared to the default 30 fps, but Cocoa seems to update the animation at 15 fps for indeterminate NSProgressIndicator. Going down to 12 or 10 fps may be an option in the future, but it's not compatible with NSProgressIndicator. Change-Id: Ie1e18d7d78d1bd7ea38a12d715a6a7db0e175a29 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/plugins/styles')
-rw-r--r--src/plugins/styles/mac/qmacstyle_mac.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm
index 8be5baf287..1cd1629347 100644
--- a/src/plugins/styles/mac/qmacstyle_mac.mm
+++ b/src/plugins/styles/mac/qmacstyle_mac.mm
@@ -4599,8 +4599,8 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
// implementation for details.
if (!animation && opt->styleObject) {
auto *animation = new QProgressStyleAnimation(d->animateSpeed(QMacStylePrivate::AquaProgressBar), opt->styleObject);
- // NSProgressIndicator is heavier to draw than the HITheme API, so we reduce the frame rate a notch.
- animation->setFrameRate(QStyleAnimation::TwentyFps);
+ // NSProgressIndicator is heavier to draw than the HITheme API, so we reduce the frame rate a couple notches.
+ animation->setFrameRate(QStyleAnimation::FifteenFps);
d->startAnimation(animation);
[ipi startAnimation];
}