Add FileSystem Rust module.
This commit is contained in:
@@ -5,10 +5,16 @@ import QtQuick.Layouts
|
||||
import clide.module 1.0
|
||||
|
||||
SplitView {
|
||||
id: root
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
orientation: Qt.Vertical
|
||||
|
||||
// The path to the file to show in the text editor.
|
||||
// This is updated by a signal caught within ClideProjectView.
|
||||
// Initialized by the Default trait for the Rust QML singleton FileSystem.
|
||||
required property string filePath;
|
||||
|
||||
// Customized handle to drag between the Editor and the Console.
|
||||
handle: Rectangle {
|
||||
border.color: SplitHandle.pressed ? RustColors.pressed : SplitHandle.hovered ? RustColors.hovered : RustColors.gutter
|
||||
@@ -102,6 +108,7 @@ SplitView {
|
||||
// selectionColor: RustColors.editor_highlight
|
||||
textFormat: Qt.AutoText
|
||||
wrapMode: TextArea.Wrap
|
||||
text: FileSystem.readFile(root.filePath)
|
||||
|
||||
background: Rectangle {
|
||||
color: RustColors.editor_background
|
||||
|
||||
@@ -51,5 +51,7 @@ SplitView {
|
||||
}
|
||||
}
|
||||
ClideEditor {
|
||||
// Initialize using the Default trait in Rust QML singleton FileSystem.
|
||||
filePath: FileSystem.filePath
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user