From d4ba7223a8b369edb08d4fa2264dfbd7aa6eb9f6 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Thu, 24 Oct 2013 13:47:43 +0200 Subject: 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 --- src/imports/dialogs/qml/DefaultWindowDecoration.qml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/imports') 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 -- cgit v1.2.3