fix the build with animation omitted
configure -no-feature-STATEMACHINE -no-feature-ANIMATION Change-Id: Idb89c0bae8d699e76916317f83490c6c94c7d8b4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>bb10
parent
4680052063
commit
b36059f611
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2480,6 +2480,7 @@ void CloseButton::paintEvent(QPaintEvent *)
|
|||
style()->drawPrimitive(QStyle::PE_IndicatorTabClose, &opt, &p, this);
|
||||
}
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
void QTabBarPrivate::Tab::TabBarAnimation::updateCurrentValue(const QVariant ¤t)
|
||||
{
|
||||
priv->moveTab(priv->tabList.indexOf(*tab), current.toInt());
|
||||
|
|
@ -2489,6 +2490,7 @@ void QTabBarPrivate::Tab::TabBarAnimation::updateState(QAbstractAnimation::State
|
|||
{
|
||||
if (newState == Stopped) priv->moveTabFinished(priv->tabList.indexOf(*tab));
|
||||
}
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue