Fix panic when loading bad text in the GUI.

This commit is contained in:
2026-02-01 17:15:21 -05:00
parent 0fac2b71ab
commit a5bed9ed2c
5 changed files with 54 additions and 41 deletions

View File

@@ -45,22 +45,25 @@ SplitView {
ColumnLayout {
spacing: 2
// TODO: Make a ClideBreadCrumb element to support select parent paths as root
Rectangle {
width: navigationView.width
height: breadCrumb.height + 5
color: RustColors.explorer_text
height: 25
color: RustColors.explorer_background
Text {
id: breadCrumb
anchors.fill: parent
text: clideTreeView.rootDirectory
color: RustColors.explorer_text
elide: Text.ElideLeft
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
}
ClideTreeView {
id: clideTreeView
onFileClicked: path => root.projectDir = path
onFileClicked: path => clideEditor.filePath = path
width: navigationView.width
height: navigationView.height
@@ -70,6 +73,7 @@ SplitView {
}
}
ClideEditor {
id: clideEditor
SplitView.fillWidth: true
// Provide a path to the file currently open in the text editor.