diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-02-06 10:05:15 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-02-06 11:32:17 +0000 |
commit | edf92fed9017a594fde8c6c6f634bb1386a6bdd3 (patch) | |
tree | 292eb86e3d3bdf7e3f078dc21196310949c775b5 /src/quicktemplates2/qquickscrollbar.cpp | |
parent | dd773d99d2e7ce94e2cef503e80caafc079b1acd (diff) |
Add "hover support" configure feature
./configure -no-feature-quicktemplates2-hover
[...]
Qt Quick Templates 2:
Hover support .......................... no
Change-Id: I0509a1a9ac3ffe2cbfe4f2016ce0345708860b84
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickscrollbar.cpp')
-rw-r--r-- | src/quicktemplates2/qquickscrollbar.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickscrollbar.cpp b/src/quicktemplates2/qquickscrollbar.cpp index 1ad14e9d..bfdc45d4 100644 --- a/src/quicktemplates2/qquickscrollbar.cpp +++ b/src/quicktemplates2/qquickscrollbar.cpp @@ -205,7 +205,12 @@ void QQuickScrollBarPrivate::setInteractive(bool enabled) void QQuickScrollBarPrivate::updateActive() { Q_Q(QQuickScrollBar); - q->setActive(moving || (interactive && (pressed || hovered))); +#if QT_CONFIG(quicktemplates2_hover) + bool hover = hovered; +#else + bool hover = false; +#endif + q->setActive(moving || (interactive && (pressed || hover))); } void QQuickScrollBarPrivate::resizeContent() @@ -599,11 +604,13 @@ void QQuickScrollBar::mouseUngrabEvent() d->handleUngrab(); } +#if QT_CONFIG(quicktemplates2_hover) void QQuickScrollBar::hoverChange() { Q_D(QQuickScrollBar); d->updateActive(); } +#endif #ifndef QT_NO_ACCESSIBILITY void QQuickScrollBar::accessibilityActiveChanged(bool active) |