aboutsummaryrefslogtreecommitdiff
path: root/qml
diff options
context:
space:
mode:
Diffstat (limited to 'qml')
-rw-r--r--qml/EmbeddedTerminal.qml62
1 files changed, 29 insertions, 33 deletions
diff --git a/qml/EmbeddedTerminal.qml b/qml/EmbeddedTerminal.qml
index 0a878b7..1bfa725 100644
--- a/qml/EmbeddedTerminal.qml
+++ b/qml/EmbeddedTerminal.qml
@@ -46,51 +46,47 @@ Item {
function unfocus() { color = "#909636" }
}
- Rectangle {
- height: terminal.height
-
- Layout.fillWidth: true
- Layout.preferredHeight: terminal.height
+ QMLTermWidget {
+ id: terminal
- color: "#ffffff"
+ font.family: "Monospace"
+ font.pointSize: 8
- QMLTermWidget {
- id: terminal
+ width: parent.width
+ height: fontMetrics.height * item.lines
- font.family: "Monospace"
- font.pointSize: 8
+ Layout.fillWidth: true
+ Layout.preferredHeight: height
- width: parent.width
- height: fontMetrics.height * item.lines
+ colorScheme: "cool-retro-term"
- session: QMLTermSession {
- initialWorkingDirectory: item.workingDirectory
+ session: QMLTermSession {
+ initialWorkingDirectory: item.workingDirectory
- shellProgram: {
- return (item.program).split(" ")[0];
- }
+ shellProgram: {
+ return (item.program).split(" ")[0];
+ }
- shellProgramArgs: {
- var elements = (item.program).split(" ");
- elements.shift();
+ shellProgramArgs: {
+ var elements = (item.program).split(" ");
+ elements.shift();
- return elements;
- }
+ return elements;
}
+ }
- onTermGetFocus: highlighter.focus()
- onTermLostFocus: highlighter.unfocus()
+ onTermGetFocus: highlighter.focus()
+ onTermLostFocus: highlighter.unfocus()
- MouseArea {
- anchors.fill: parent
- acceptedButtons: Qt.NoButton
- onWheel: { }
- }
+ MouseArea {
+ anchors.fill: parent
+ acceptedButtons: Qt.NoButton
+ onWheel: { }
+ }
- Component.onCompleted: {
- forceActiveFocus();
- session.startShellProgram();
- }
+ Component.onCompleted: {
+ forceActiveFocus();
+ session.startShellProgram();
}
}
}