aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2013-10-24 13:47:43 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-30 15:29:32 +0100
commitd4ba7223a8b369edb08d4fa2264dfbd7aa6eb9f6 (patch)
tree1c31ddecbab7e26e013bcca2567c30c2a68042de /src/imports
parent5e4fc4b97aa638dc94ae947476684eb4a09ef9d0 (diff)
QtQuick.Dialogs: fake window decoration clips, is opaque for touch
This is the wrapper for dialogs on platforms that don't have top-level windows. Mouse events over any unused area in the dialog would fall through to the surrounding mouse area and close the dialog. Now they don't. Clipping is enabled to ensure that dialog contents don't overflow the "window" frame. Change-Id: Ia3c0ae44bb47d46981daac9febd4cc93228dd20f Reviewed-by: Liang Qi <liang.qi@digia.com>
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/dialogs/qml/DefaultWindowDecoration.qml3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/imports/dialogs/qml/DefaultWindowDecoration.qml b/src/imports/dialogs/qml/DefaultWindowDecoration.qml
index 69a8658aba..ec930101d2 100644
--- a/src/imports/dialogs/qml/DefaultWindowDecoration.qml
+++ b/src/imports/dialogs/qml/DefaultWindowDecoration.qml
@@ -55,11 +55,14 @@ Rectangle {
id: borderImage
property Item content
+ MouseArea { anchors.fill: parent }
+
width: content ? content.width + 15 : 0
height: content ? content.height + 15 : 0
onWidthChanged: content.x = 5
onHeightChanged: content.y = 5
border { left: 10; top: 10; right: 10; bottom: 10 }
+ clip: true
source: "../images/window_border.png"
anchors.centerIn: parent
onContentChanged: if (content) content.parent = borderImage