summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qmacstyle_mac_p_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/styles/qmacstyle_mac_p_p.h')
-rw-r--r--src/widgets/styles/qmacstyle_mac_p_p.h26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/widgets/styles/qmacstyle_mac_p_p.h b/src/widgets/styles/qmacstyle_mac_p_p.h
index c2e5a024a4..dae87bfec6 100644
--- a/src/widgets/styles/qmacstyle_mac_p_p.h
+++ b/src/widgets/styles/qmacstyle_mac_p_p.h
@@ -209,34 +209,50 @@ public:
void* receiver;
void *nsscroller;
#endif
+ void *indicatorBranchButtonCell;
};
-class QFadeOutAnimation : public QNumberStyleAnimation
+class QScrollbarAnimation : public QNumberStyleAnimation
{
Q_OBJECT
public:
- QFadeOutAnimation(QObject *target) : QNumberStyleAnimation(target), _active(false)
+ QScrollbarAnimation(QObject *target) : QNumberStyleAnimation(target), _active(false)
+ { }
+
+ bool wasActive() const { return _active; }
+ void setActive(bool active) { _active = active; }
+
+ bool isFadingOut() const { return _isFadingOut; }
+
+ void setFadingOut()
{
+ _isFadingOut = true;
setDuration(QMacStylePrivate::ScrollBarFadeOutDelay + QMacStylePrivate::ScrollBarFadeOutDuration);
setDelay(QMacStylePrivate::ScrollBarFadeOutDelay);
setStartValue(1.0);
setEndValue(0.0);
}
- bool wasActive() const { return _active; }
- void setActive(bool active) { _active = active; }
+ void setExpanding()
+ {
+ _isFadingOut = false;
+ setDuration(QMacStylePrivate::ScrollBarFadeOutDuration);
+ setStartValue(0.0);
+ setEndValue(1.0);
+ }
private slots:
void updateCurrentTime(int time)
{
QNumberStyleAnimation::updateCurrentTime(time);
- if (qFuzzyIsNull(currentValue()))
+ if (_isFadingOut && qFuzzyIsNull(currentValue()))
target()->setProperty("visible", false);
}
private:
bool _active;
+ bool _isFadingOut;
};
QT_END_NAMESPACE