aboutsummaryrefslogtreecommitdiff
path: root/qml
diff options
context:
space:
mode:
authorAdrian Kummerlaender2015-07-21 18:25:52 +0200
committerAdrian Kummerlaender2015-07-21 18:25:52 +0200
commit607e86675e831a1fa70de5b2813a0e0f9d1bbd56 (patch)
treeddcac34cb71517d27ff07eba270a697ca9619be9 /qml
parent84f2d6febc9344261dcb59c022f293f4f0de3d9a (diff)
downloadMetaTerm-607e86675e831a1fa70de5b2813a0e0f9d1bbd56.tar
MetaTerm-607e86675e831a1fa70de5b2813a0e0f9d1bbd56.tar.gz
MetaTerm-607e86675e831a1fa70de5b2813a0e0f9d1bbd56.tar.bz2
MetaTerm-607e86675e831a1fa70de5b2813a0e0f9d1bbd56.tar.lz
MetaTerm-607e86675e831a1fa70de5b2813a0e0f9d1bbd56.tar.xz
MetaTerm-607e86675e831a1fa70de5b2813a0e0f9d1bbd56.tar.zst
MetaTerm-607e86675e831a1fa70de5b2813a0e0f9d1bbd56.zip
Introduced `frameWidth` property and defined minimum terminal lines
Diffstat (limited to 'qml')
-rw-r--r--qml/EmbeddedTerminal.qml10
-rw-r--r--qml/TerminalItem.qml12
2 files changed, 11 insertions, 11 deletions
diff --git a/qml/EmbeddedTerminal.qml b/qml/EmbeddedTerminal.qml
index 1bfa725..2e58fa9 100644
--- a/qml/EmbeddedTerminal.qml
+++ b/qml/EmbeddedTerminal.qml
@@ -8,9 +8,10 @@ Item {
property string program
property string workingDirectory
property int lines
+ property int frameWidth : 10
height: terminal.height
- width: parent.width
+ width: parent.width - frameWidth
function select() { highlighter.select() }
function deselect() { highlighter.deselect() }
@@ -28,7 +29,7 @@ Item {
Rectangle {
id: highlighter
- width: 10
+ width: item.frameWidth
Layout.fillHeight: true
color: "#909636"
@@ -52,11 +53,8 @@ Item {
font.family: "Monospace"
font.pointSize: 8
- width: parent.width
- height: fontMetrics.height * item.lines
-
Layout.fillWidth: true
- Layout.preferredHeight: height
+ Layout.preferredHeight: fontMetrics.height * item.lines
colorScheme: "cool-retro-term"
diff --git a/qml/TerminalItem.qml b/qml/TerminalItem.qml
index f3527b8..0650b1e 100644
--- a/qml/TerminalItem.qml
+++ b/qml/TerminalItem.qml
@@ -11,7 +11,7 @@ Item {
signal executed
anchors {
- left: parent.left
+ left: parent.left
right: parent.right
}
@@ -57,7 +57,9 @@ Item {
function shorten() {
if ( terminal !== null ) {
- terminal.lines -= 1;
+ if ( terminal.lines > 10 ) {
+ terminal.lines -= 1;
+ }
}
}
@@ -65,7 +67,7 @@ Item {
id: scope
anchors {
- left: parent.left
+ left: parent.left
right: parent.right
}
@@ -73,7 +75,7 @@ Item {
id: elementList
anchors {
- left: parent.left
+ left: parent.left
right: parent.right
}
@@ -97,7 +99,7 @@ Item {
RowLayout {
anchors {
- left: parent.left
+ left: parent.left
right: parent.right
}