7 Commits

Author SHA1 Message Date
e3bf484a5d Remove TODO 2026-02-08 16:21:52 -05:00
bedd510b0a Update GUI screenshot. 2026-02-08 15:46:17 -05:00
a30ea2b457 Remove TODOs. 2026-02-08 15:37:24 -05:00
52ceda5b06 Reorganize files. 2026-02-08 15:29:34 -05:00
a37fd74d32 Fix spacing. 2026-02-08 15:25:21 -05:00
6ed4ca11f4 Fix width for file tree selection. 2026-02-08 15:21:06 -05:00
41fab2847d Update GUI screenshot in README. 2026-02-08 15:10:06 -05:00
12 changed files with 22 additions and 40 deletions

View File

@@ -107,6 +107,8 @@ cargo run
clide clide
``` ```
![image](./resources/gui.png)
## Development ## Development
It's recommended to use RustRover or Qt Creator for development. It's recommended to use RustRover or Qt Creator for development.

View File

@@ -2,21 +2,21 @@ use cxx_qt_build::{CxxQtBuilder, QmlModule};
fn main() { fn main() {
CxxQtBuilder::new_qml_module(QmlModule::new("clide.module").qml_files(&[ CxxQtBuilder::new_qml_module(QmlModule::new("clide.module").qml_files(&[
"qml/main.qml",
"qml/ClideAboutWindow.qml",
"qml/ClideTreeView.qml",
"qml/ClideApplicationView.qml", "qml/ClideApplicationView.qml",
"qml/ClideExplorerView.qml",
"qml/ClideEditor.qml",
"qml/ClideEditorView.qml", "qml/ClideEditorView.qml",
"qml/ClideMenuBar.qml", "qml/ClideExplorerView.qml",
"qml/ClideLogger.qml", "qml/ClideTreeView.qml",
"qml/Components/ClideScrollBar.qml", "qml/Components/ClideAboutWindow.qml",
"qml/Components/ClideHandle.qml",
"qml/Components/ClideMenu.qml",
"qml/Components/ClideMenuItem.qml",
"qml/Components/ClideBreadCrumbs.qml", "qml/Components/ClideBreadCrumbs.qml",
"qml/Components/ClideEditor.qml",
"qml/Components/ClideHandle.qml",
"qml/Components/ClideLogger.qml",
"qml/Components/ClideMenu.qml",
"qml/Components/ClideMenuBar.qml",
"qml/Components/ClideMenuItem.qml",
"qml/Components/ClideScrollBar.qml",
"qml/Logger/Logger.qml", "qml/Logger/Logger.qml",
"qml/main.qml",
])) ]))
// Link Qt's Network library // Link Qt's Network library
// - Qt Core is always linked // - Qt Core is always linked

View File

@@ -23,6 +23,7 @@ Rectangle {
SplitView { SplitView {
anchors.fill: parent anchors.fill: parent
orientation: Qt.Vertical orientation: Qt.Vertical
spacing: 3
// Customized handle to drag between the Editor and the Console. // Customized handle to drag between the Editor and the Console.
handle: ClideHandle { handle: ClideHandle {

View File

@@ -51,7 +51,7 @@ TreeView {
background: Rectangle { background: Rectangle {
color: current ? RustColors.explorer_folder_open : "transparent" color: current ? RustColors.explorer_folder_open : "transparent"
radius: 20 radius: 20
width: root.width - 15 width: root.width
} }
// Item name. // Item name.
contentItem: Text { contentItem: Text {

View File

@@ -20,13 +20,11 @@ Rectangle {
if (cleaned.endsWith("/")) if (cleaned.endsWith("/"))
cleaned = cleaned.slice(0, -1); cleaned = cleaned.slice(0, -1);
Logger.trace("Building segments for path: " + cleaned); Logger.trace("Building segments for path: " + cleaned);
segments = []; segments = ["/"];
fullPaths = []; fullPaths = ["/"];
segments.push("/");
fullPaths.push("/");
let parts = cleaned.split("/"); let parts = cleaned.split("/");
let current = ""; let current = "";
// We already pushed the root `/` path above, so skip index 0. // We already pushed the root `/` path during initialization, so skip index 0.
for (let i = 1; i < parts.length; ++i) { for (let i = 1; i < parts.length; ++i) {
current += "/" + parts[i]; current += "/" + parts[i];
Logger.trace("Pushing path: " + parts[i] + " Current: " + current); Logger.trace("Pushing path: " + parts[i] + " Current: " + current);

View File

@@ -104,28 +104,6 @@ Rectangle {
onLinkActivated: function (link) { onLinkActivated: function (link) {
Qt.openUrlExternally(link); Qt.openUrlExternally(link);
} }
// TODO: Handle saving
// Component.onCompleted: {
// if (Qt.application.arguments.length === 2)
// textDocument.source = "file:" + Qt.application.arguments[1]
// else
// textDocument.source = "qrc:/texteditor.html"
// }
// textDocument.onStatusChanged: {
// // a message lookup table using computed properties:
// // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer
// const statusMessages = {
// [ TextDocument.ReadError ]: qsTr("Failed to load %1"),
// [ TextDocument.WriteError ]: qsTr("Failed to save %1"),
// [ TextDocument.NonLocalFileError ]: qsTr("Not a local file: %1"),
// }
// const err = statusMessages[textDocument.status]
// if (err) {
// errorDialog.text = err.arg(textDocument.source)
// errorDialog.open()
// }
// }
} }
FontMetrics { FontMetrics {

View File

@@ -3,3 +3,7 @@ ClideHandle ClideHandle.qml
ClideMenu ClideMenu.qml ClideMenu ClideMenu.qml
ClideMenuItem ClideMenuItem.qml ClideMenuItem ClideMenuItem.qml
ClideBreadCrumbs ClideBreadCrumbs.qml ClideBreadCrumbs ClideBreadCrumbs.qml
ClideAboutWindow ClideAboutWindow.qml
ClideEditor ClideEditor.qml
ClideLogger ClideLogger.qml
ClideMenuBar ClideMenuBar.qml

BIN
resources/gui.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 KiB

View File

@@ -57,7 +57,6 @@ pub mod qobject {
} }
} }
// TODO: Implement a provider for QFileSystemModel::setIconProvider for icons.
pub struct FileSystemImpl { pub struct FileSystemImpl {
file_path: QString, file_path: QString,
} }