[ui] Custom SplitView to have a larger handle

This commit is contained in:
Fabien Castan 2024-09-19 20:39:43 +02:00
parent ccd88c4646
commit 2852a4cf19
6 changed files with 32 additions and 7 deletions

View file

@ -988,7 +988,8 @@ Page {
highlightChunks: false
}
SplitView {
MSplitView {
id: topBottomSplit
Layout.fillHeight: true
width: parent.width
@ -1032,7 +1033,7 @@ Page {
}
}
SplitView {
MSplitView {
id: bottomContainer
orientation: Qt.Horizontal
visible: settingsUILayout.showGraphEditor

View file

@ -0,0 +1,23 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
SplitView {
id: splitView
handle: Item {
id: handleDelegate
implicitWidth: 5
implicitHeight: 5
property bool hovered: SplitHandle.hovered
property bool pressed: SplitHandle.pressed
Rectangle {
id: handleDisplay
anchors.centerIn: parent
property int handleSize: handleDelegate.hovered ? 3 : 1
width: splitView.orientation === Qt.Horizontal ? handleSize : handleDelegate.width
height: splitView.orientation === Qt.Vertical ? handleSize : handleDelegate.height
color: handleDelegate.pressed ? Qt.lighter(palette.highlight, 1.5)
: (handleDelegate.hovered ? palette.highlight : palette.base)
}
}
}

View file

@ -14,3 +14,4 @@ ExifOrientedViewer 1.0 ExifOrientedViewer.qml
FilterComboBox 1.0 FilterComboBox.qml
IntSelector 1.0 IntSelector.qml
MScrollBar 1.0 MScrollBar.qml
MSplitView 1.0 MSplitView.qml

View file

@ -253,7 +253,7 @@ Panel {
Component {
id: editor_component
SplitView {
MSplitView {
anchors.fill: parent
// The list of chunks

View file

@ -15,7 +15,7 @@ Page {
}
}
SplitView {
MSplitView {
id: splitView
anchors.fill: parent

View file

@ -59,11 +59,11 @@ Item {
SystemPalette { id: activePalette }
SplitView {
MSplitView {
id: mainSplitView
anchors.fill: parent
SplitView {
MSplitView {
id: leftSplitView
visible: settingsUILayout.showImageGallery || settingsUILayout.showLiveReconstruction
orientation: Qt.Vertical
@ -215,7 +215,7 @@ Item {
property alias viewer3D: c_viewer3D
SplitView {
MSplitView {
id: c_viewer3DSplitView
anchors.fill: parent
Viewer3D {