2025-03-29 17:59:17 -04:00
|
|
|
import QtQuick
|
|
|
|
|
import QtQuick.Controls
|
|
|
|
|
import QtQuick.Layouts
|
|
|
|
|
|
2025-03-30 11:20:21 -04:00
|
|
|
import clide.module 1.0
|
|
|
|
|
|
2025-03-29 17:59:17 -04:00
|
|
|
SplitView {
|
2025-03-30 16:14:58 -04:00
|
|
|
id: root
|
|
|
|
|
|
|
|
|
|
// Path to the file selected in the tree view.
|
|
|
|
|
property string selectedFilePath;
|
|
|
|
|
|
2025-03-29 17:59:17 -04:00
|
|
|
Layout.fillHeight: true
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
|
|
// Customized handle to drag between the Navigation and the Editor.
|
|
|
|
|
handle: Rectangle {
|
2025-03-30 11:20:21 -04:00
|
|
|
border.color: SplitHandle.pressed ? RustColors.pressed : SplitHandle.hovered ? RustColors.hovered : RustColors.gutter
|
|
|
|
|
color: SplitHandle.pressed ? RustColors.pressed : SplitHandle.hovered ? RustColors.hovered : RustColors.gutter
|
2025-03-29 17:59:17 -04:00
|
|
|
implicitWidth: 8
|
2025-03-30 11:20:21 -04:00
|
|
|
radius: 2.5
|
2025-03-29 17:59:17 -04:00
|
|
|
|
2025-03-30 11:20:21 -04:00
|
|
|
// Execute these behaviors when the color is changed.
|
|
|
|
|
Behavior on color {
|
|
|
|
|
ColorAnimation {
|
|
|
|
|
duration: 400
|
2025-03-29 17:59:17 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
id: navigationView
|
|
|
|
|
|
|
|
|
|
SplitView.fillHeight: true
|
|
|
|
|
SplitView.preferredWidth: 200
|
2025-03-30 11:20:21 -04:00
|
|
|
color: RustColors.explorer_background
|
2025-03-29 17:59:17 -04:00
|
|
|
|
|
|
|
|
StackLayout {
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
|
|
// Shows the help text.
|
|
|
|
|
TextArea {
|
|
|
|
|
placeholderText: qsTr("File system view placeholder")
|
|
|
|
|
placeholderTextColor: "white"
|
|
|
|
|
readOnly: true
|
|
|
|
|
wrapMode: TextArea.Wrap
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-30 16:14:58 -04:00
|
|
|
ClideTreeView {
|
|
|
|
|
id: clideTreeView
|
|
|
|
|
onFileClicked: path => root.currentFilePath = path
|
|
|
|
|
}
|
2025-03-29 17:59:17 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
ClideEditor {
|
2025-03-30 13:50:23 -04:00
|
|
|
// Initialize using the Default trait in Rust QML singleton FileSystem.
|
|
|
|
|
filePath: FileSystem.filePath
|
2025-03-29 17:59:17 -04:00
|
|
|
}
|
|
|
|
|
}
|