aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickdrawer.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-07-22 07:29:26 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-07-22 12:14:42 +0000
commitc0695b3911f99132e7de5df9a9fa676f2df33721 (patch)
treea516729439d334eb93032155032d66f79af6b3a8 /src/quicktemplates2/qquickdrawer.cpp
parent333c226f7cfc53a7e55a8e4d5502788d39847342 (diff)
Fix hover event handling for drawer overlays
Closed drawers sit visible at the window edge to be able to pull them out. Don't block hover events when drawers are fully closed ie. when their overlays are fully translucent. Task-number: QTBUG-53419 Change-Id: I5bdbed5a2cf3ad6972634432ac79f7fbe5054b98 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickdrawer.cpp')
-rw-r--r--src/quicktemplates2/qquickdrawer.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickdrawer.cpp b/src/quicktemplates2/qquickdrawer.cpp
index c165b077..fe0a3c72 100644
--- a/src/quicktemplates2/qquickdrawer.cpp
+++ b/src/quicktemplates2/qquickdrawer.cpp
@@ -431,8 +431,12 @@ void QQuickDrawer::setPosition(qreal position)
d->position = position;
if (isComponentComplete())
d->reposition();
- if (d->dimmer)
+ if (d->dimmer) {
d->dimmer->setOpacity(position);
+ // TODO: check QStyleHints::useHoverEffects in Qt 5.8
+ d->dimmer->setAcceptHoverEvents(d->modal && position > 0.0);
+ // d->dimmer->setAcceptHoverEvents(d->modal && position > 0.0 && QGuiApplication::styleHints()->useHoverEffects());
+ }
emit positionChanged();
}