Debian Codegraph @

src/qml/CSplitView.qml

raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2 // Copyright 2025 Juan Palacios <[email protected]>
3
4 import QtQuick 2.15
5 import QtQuick.Controls 2.15
6 import "Style.js" as Style
7
8 SplitView {
9 id: spv
10 spacing: 0
11
12 handle: Rectangle {
13 implicitWidth: spv.orientation === Qt.Horizontal ? Style.Split.thickness
14 : spv.width
15 implicitHeight: spv.orientation === Qt.Horizontal ? spv.height
16 : Style.Split.thickness
17 color: !spv.enabled ? Qt.lighter(Style.Split.background, 1.20)
18 : SplitHandle.hovered ? Qt.lighter(Style.Split.background, 1.15)
19 : Style.Split.background
20 Rectangle {
21 color: Style.Split.Handle.background
22 width: spv.orientation === Qt.Horizontal ? Style.Split.Handle.thickness
23 : Style.Split.Handle.length
24 height: spv.orientation === Qt.Horizontal ? Style.Split.Handle.length
25 : Style.Split.Handle.thickness
26 x: (parent.width - width) / 2
27 y: (parent.height - height) / 2
28 }
29 }
30 }