summaryrefslogtreecommitdiff
path: root/components/SplitterRow.qml
blob: c6012e4cfdc000e8133d79df6bd69f2e9e4e3c72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import QtQuick 1.1
import "custom" as Components
import QtDesktop 0.1

Components.SplitterRow {
    handleBackground: StyleItem {
            id: styleitem
            elementType: "splitter"
            width: pixelMetric("splitterwidth")
            property alias pressed: mouseArea.pressed
            property bool dragged: mouseArea.drag.active

            MouseArea {
                id: mouseArea
                anchors.fill: parent
                anchors.leftMargin: (parent.width <= 1) ? -2 : 0
                anchors.rightMargin: (parent.width <= 1) ? -2 : 0
                drag.axis: Qt.YAxis
                drag.target: handle

                StyleItem {
                    anchors.fill: parent
                    cursor: "splithcursor"
                }
            }
    }
}