aboutsummaryrefslogtreecommitdiff
path: root/qml/EmbeddedTerminal.qml
diff options
context:
space:
mode:
authorAdrian Kummerlaender2015-07-19 12:00:14 +0200
committerAdrian Kummerlaender2015-07-19 12:00:14 +0200
commitab1d14d90e69e35f45eefa8e7236d566fea81c41 (patch)
tree85942571b1058e8e10b0abce7f73b3de36474d49 /qml/EmbeddedTerminal.qml
parentee80c422c341068188820a9e5d9757be80735012 (diff)
downloadMetaTerm-ab1d14d90e69e35f45eefa8e7236d566fea81c41.tar
MetaTerm-ab1d14d90e69e35f45eefa8e7236d566fea81c41.tar.gz
MetaTerm-ab1d14d90e69e35f45eefa8e7236d566fea81c41.tar.bz2
MetaTerm-ab1d14d90e69e35f45eefa8e7236d566fea81c41.tar.lz
MetaTerm-ab1d14d90e69e35f45eefa8e7236d566fea81c41.tar.xz
MetaTerm-ab1d14d90e69e35f45eefa8e7236d566fea81c41.tar.zst
MetaTerm-ab1d14d90e69e35f45eefa8e7236d566fea81c41.zip
Maximized terminal width
Terminal width is now automatically adjusted to use all available space. Commands to control horizontal terminal height were removed correspondingly.
Diffstat (limited to 'qml/EmbeddedTerminal.qml')
-rw-r--r--qml/EmbeddedTerminal.qml23
1 files changed, 16 insertions, 7 deletions
diff --git a/qml/EmbeddedTerminal.qml b/qml/EmbeddedTerminal.qml
index 146df7f..0a878b7 100644
--- a/qml/EmbeddedTerminal.qml
+++ b/qml/EmbeddedTerminal.qml
@@ -1,28 +1,35 @@
import QtQuick 2.0
import QMLTermWidget 1.0
+import QtQuick.Layouts 1.1
Item {
id: item
property string program
property string workingDirectory
- property int columns
property int lines
- width: container.width
- height: container.height
+ height: terminal.height
+ width: parent.width
function select() { highlighter.select() }
function deselect() { highlighter.deselect() }
- Row {
+ RowLayout {
id: container
+ anchors {
+ left: parent.left
+ right: parent.right
+ }
+
+ spacing: 0
+
Rectangle {
id: highlighter
width: 10
- height: terminal.height
+ Layout.fillHeight: true
color: "#909636"
@@ -40,9 +47,11 @@ Item {
}
Rectangle {
- width: terminal.width
height: terminal.height
+ Layout.fillWidth: true
+ Layout.preferredHeight: terminal.height
+
color: "#ffffff"
QMLTermWidget {
@@ -51,7 +60,7 @@ Item {
font.family: "Monospace"
font.pointSize: 8
- width: fontMetrics.width * item.columns
+ width: parent.width
height: fontMetrics.height * item.lines
session: QMLTermSession {