diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2014-11-25 07:49:37 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@digia.com> | 2014-11-27 09:36:04 +0100 |
commit | b36059f611d43666f28009cb2550c3c8d96a0680 (patch) | |
tree | 3b6f80183d96dfd32d595f4360a4bca8c574b0aa /src/widgets/styles | |
parent | 468005206348c82426f38983c77abc677834ade5 (diff) |
fix the build with animation omitted
configure -no-feature-STATEMACHINE -no-feature-ANIMATION
Change-Id: Idb89c0bae8d699e76916317f83490c6c94c7d8b4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/widgets/styles')
-rw-r--r-- | src/widgets/styles/qfusionstyle.cpp | 6 | ||||
-rw-r--r-- | src/widgets/styles/qgtkstyle.cpp | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp index 71a9b1abd7..ed7b4ab3b6 100644 --- a/src/widgets/styles/qfusionstyle.cpp +++ b/src/widgets/styles/qfusionstyle.cpp @@ -1403,7 +1403,9 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio painter->drawRoundedRect(progressBar.adjusted(1, 1, -1, -1), 1, 1); if (!indeterminate) { +#ifndef QT_NO_ANIMATION (const_cast<QFusionStylePrivate*>(d))->stopAnimation(option->styleObject); +#endif } else { highlightedGradientStartColor.setAlpha(120); painter->setPen(QPen(highlightedGradientStartColor, 9.0)); @@ -2430,6 +2432,7 @@ void QFusionStyle::drawComplexControl(ComplexControl control, const QStyleOption styleObject->setProperty("_q_stylestate", static_cast<int>(scrollBar->state)); styleObject->setProperty("_q_stylecontrols", static_cast<uint>(scrollBar->activeSubControls)); +#ifndef QT_NO_ANIMATION QScrollbarStyleAnimation *anim = qobject_cast<QScrollbarStyleAnimation *>(d->animation(styleObject)); if (transient) { if (!anim) { @@ -2443,8 +2446,10 @@ void QFusionStyle::drawComplexControl(ComplexControl control, const QStyleOption } else if (anim && anim->mode() == QScrollbarStyleAnimation::Deactivating) { d->stopAnimation(styleObject); } +#endif // !QT_NO_ANIMATION } +#ifndef QT_NO_ANIMATION QScrollbarStyleAnimation *anim = qobject_cast<QScrollbarStyleAnimation *>(d->animation(styleObject)); if (anim && anim->mode() == QScrollbarStyleAnimation::Deactivating) { // once a scrollbar was active (hovered/pressed), it retains @@ -2473,6 +2478,7 @@ void QFusionStyle::drawComplexControl(ComplexControl control, const QStyleOption } } painter->setOpacity(opacity); +#endif // !QT_NO_ANIMATION } bool transient = proxy()->styleHint(SH_ScrollBar_Transient, option, widget); diff --git a/src/widgets/styles/qgtkstyle.cpp b/src/widgets/styles/qgtkstyle.cpp index 9e120e3b57..f87af6cd93 100644 --- a/src/widgets/styles/qgtkstyle.cpp +++ b/src/widgets/styles/qgtkstyle.cpp @@ -3514,15 +3514,19 @@ void QGtkStyle::drawControl(ControlElement element, progressBar.setRect(rect.left(), rect.top(), width, rect.height()); else progressBar.setRect(rect.right() - width, rect.top(), width, rect.height()); +#ifndef QT_NO_ANIMATION d->stopAnimation(option->styleObject); +#endif } else { Q_D(const QGtkStyle); int slideWidth = ((rect.width() - 4) * 2) / 3; int step = 0; +#ifndef QT_NO_ANIMATION if (QProgressStyleAnimation *animation = qobject_cast<QProgressStyleAnimation*>(d->animation(option->styleObject))) step = animation->progressStep(slideWidth); else d->startAnimation(new QProgressStyleAnimation(d->animationFps, option->styleObject)); +#endif progressBar.setRect(rect.left() + step, rect.top(), slideWidth / 2, rect.height()); } |