summaryrefslogtreecommitdiffstats
path: root/tools/qqem/qml/CustomSplitView.qml
blob: 88ea9e1aada0bd3eeb99d376ea838bacdddc48ee (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
28
29
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

import QtQuick
import QtQuick.Controls

SplitView {
    id: mainSplitView

    handle: Rectangle {
        implicitWidth: parent.orientation === Qt.Horizontal ? 6 : parent.width
        implicitHeight: parent.orientation === Qt.Horizontal ? parent.height : 6
        color: Qt.lighter(mainView.backgroundColor1, 1.2)
        Image {
            x: (parent.width - width) / 2
            y: (parent.height - height) / 2
            source:"images/icon_viewseparator.png"
            rotation:  parent.parent.orientation === Qt.Horizontal ? 90 : 0
            opacity: parent.SplitHandle.pressed ? 1.0 : parent.SplitHandle.hovered ? 0.6 : 0.2
            width: 32
            height: 8
            Behavior on opacity {
                NumberAnimation {
                    duration: 200
                }
            }
        }
    }
}