diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2014-01-08 08:52:55 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-10 13:03:59 +0100 |
commit | 07f8045959429ace4023e526245ab2a25eb2f2a9 (patch) | |
tree | 746faad16a7efd09344f9879baeefab4aecdc775 /src/controls/SplitView.qml | |
parent | 06178e0d0f18d15635fbcf23e179e4fbdf8c68a8 (diff) | |
download | qtquickcontrols-07f8045959429ace4023e526245ab2a25eb2f2a9.tar.gz |
SplitView: wider splitter on touchscreens
7mm is a typical minimum size for anything meant to be touchable.
Change-Id: Ie29d178495f0b9feae7e76ceaed848301232d2b8
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src/controls/SplitView.qml')
-rw-r--r-- | src/controls/SplitView.qml | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/controls/SplitView.qml b/src/controls/SplitView.qml index 1f829a34..b079bc50 100644 --- a/src/controls/SplitView.qml +++ b/src/controls/SplitView.qml @@ -42,6 +42,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.1 import QtQuick.Layouts 1.0 import QtQuick.Controls.Private 1.0 as Private +import QtQuick.Window 2.1 /*! \qmltype SplitView @@ -393,10 +394,11 @@ Item { MouseArea { id: mouseArea anchors.fill: parent - anchors.leftMargin: (parent.width <= 1) ? -2 : 0 - anchors.rightMargin: (parent.width <= 1) ? -2 : 0 - anchors.topMargin: (parent.height <= 1) ? -2 : 0 - anchors.bottomMargin: (parent.height <= 1) ? -2 : 0 + property real defaultMargin: Private.Settings.hasTouchScreen ? Screen.pixelDensity * 3.5 : 2 + anchors.leftMargin: (parent.width <= 1) ? -defaultMargin : 0 + anchors.rightMargin: (parent.width <= 1) ? -defaultMargin : 0 + anchors.topMargin: (parent.height <= 1) ? -defaultMargin : 0 + anchors.bottomMargin: (parent.height <= 1) ? -defaultMargin : 0 hoverEnabled: true drag.threshold: 0 drag.target: parent |