aboutsummaryrefslogtreecommitdiff
path: root/qml
diff options
context:
space:
mode:
authorAdrian Kummerlaender2015-07-19 20:19:44 +0200
committerAdrian Kummerlaender2015-07-19 20:19:44 +0200
commiteca10a1bd5b1f6186d280848bc102e0503c7b487 (patch)
tree9b63b1b84389280fd916c112e4cbbca5f1135143 /qml
parentab1d14d90e69e35f45eefa8e7236d566fea81c41 (diff)
downloadMetaTerm-eca10a1bd5b1f6186d280848bc102e0503c7b487.tar
MetaTerm-eca10a1bd5b1f6186d280848bc102e0503c7b487.tar.gz
MetaTerm-eca10a1bd5b1f6186d280848bc102e0503c7b487.tar.bz2
MetaTerm-eca10a1bd5b1f6186d280848bc102e0503c7b487.tar.lz
MetaTerm-eca10a1bd5b1f6186d280848bc102e0503c7b487.tar.xz
MetaTerm-eca10a1bd5b1f6186d280848bc102e0503c7b487.tar.zst
MetaTerm-eca10a1bd5b1f6186d280848bc102e0503c7b487.zip
Removed unnecessary `QMLTermWidget` background rectangle
The background color is set accordingly to the color scheme by the widget itself.
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();
}
}
}