TUI #1
1
build.rs
1
build.rs
@ -12,6 +12,7 @@ fn main() {
|
|||||||
uri: "clide.module",
|
uri: "clide.module",
|
||||||
rust_files: &["src/colors.rs"],
|
rust_files: &["src/colors.rs"],
|
||||||
qml_files: &["qml/main.qml",
|
qml_files: &["qml/main.qml",
|
||||||
|
"qml/ClideAboutWindow.qml",
|
||||||
"qml/ClideProjectView.qml",
|
"qml/ClideProjectView.qml",
|
||||||
"qml/ClideEditor.qml",
|
"qml/ClideEditor.qml",
|
||||||
"qml/ClideMenuBar.qml"],
|
"qml/ClideMenuBar.qml"],
|
||||||
|
|||||||
BIN
icons/kilroy-256.png
Normal file
BIN
icons/kilroy-256.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
73
qml/ClideAboutWindow.qml
Normal file
73
qml/ClideAboutWindow.qml
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
// TODO: Header
|
||||||
|
|
||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls.Basic
|
||||||
|
|
||||||
|
import clide.module 1.0
|
||||||
|
|
||||||
|
ApplicationWindow {
|
||||||
|
id: root
|
||||||
|
width: 450
|
||||||
|
height: 350
|
||||||
|
// Create the window with no frame and keep it on top.
|
||||||
|
flags: Qt.Window | Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint
|
||||||
|
color: RustColors.gutter
|
||||||
|
|
||||||
|
// Hide the window when it loses focus.
|
||||||
|
onActiveChanged: {
|
||||||
|
if (!active) {
|
||||||
|
root.visible = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Kilroy logo.
|
||||||
|
Image {
|
||||||
|
id: logo
|
||||||
|
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.margins: 20
|
||||||
|
|
||||||
|
source: "../icons/kilroy-256.png"
|
||||||
|
sourceSize.width: 80
|
||||||
|
sourceSize.height: 80
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
|
||||||
|
smooth: true
|
||||||
|
antialiasing: true
|
||||||
|
asynchronous: true
|
||||||
|
}
|
||||||
|
|
||||||
|
ScrollView {
|
||||||
|
anchors.top: logo.bottom
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.margins: 20
|
||||||
|
|
||||||
|
TextArea {
|
||||||
|
selectedTextColor: RustColors.editor_highlighted_text
|
||||||
|
selectionColor: RustColors.editor_highlight
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
textFormat: Text.RichText
|
||||||
|
|
||||||
|
text: qsTr("<h3>About CLIDE</h3>"
|
||||||
|
+ "<p>A simple text editor written in Rust and QML using CXX-Qt.</p>"
|
||||||
|
+ "<p>Personal website <a href=\"http://shaunreed.com\">shaunreed.com</a></p>"
|
||||||
|
+ "<p>Project notes <a href=\"http://knoats.com\">knoats.com</a></p>"
|
||||||
|
+ "<p>This project is developed at <a href=\"http://git.shaunreed.com/shaunrd0/clide\">git.shaunreed.com</a></p>"
|
||||||
|
+ "<p><a href=\"https://github.com/KDAB/cxx-qt\">KDAB CXX-Qt repository</a></p>"
|
||||||
|
+ "<p>Copyright (C) 2025 Shaun Reed, all rights reserved.</p>")
|
||||||
|
color: RustColors.editor_text
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
readOnly: true
|
||||||
|
antialiasing: true
|
||||||
|
background: null
|
||||||
|
|
||||||
|
onLinkActivated: function (link) {
|
||||||
|
Qt.openUrlExternally(link)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -156,6 +156,10 @@ MenuBar {
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Help Menu
|
// Help Menu
|
||||||
|
ClideAboutWindow {
|
||||||
|
id: clideAbout
|
||||||
|
}
|
||||||
|
|
||||||
Action {
|
Action {
|
||||||
id: actionDocumentation
|
id: actionDocumentation
|
||||||
|
|
||||||
@ -163,6 +167,8 @@ MenuBar {
|
|||||||
}
|
}
|
||||||
Action {
|
Action {
|
||||||
id: actionAbout
|
id: actionAbout
|
||||||
|
// Toggle the about window with the menu item is clicked.
|
||||||
|
onTriggered: clideAbout.visible = !clideAbout.visible
|
||||||
|
|
||||||
text: qsTr("&About")
|
text: qsTr("&About")
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user