From ab1d14d90e69e35f45eefa8e7236d566fea81c41 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 19 Jul 2015 12:00:14 +0200 Subject: Maximized terminal width Terminal width is now automatically adjusted to use all available space. Commands to control horizontal terminal height were removed correspondingly. --- qml/TerminalItem.qml | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) (limited to 'qml/TerminalItem.qml') diff --git a/qml/TerminalItem.qml b/qml/TerminalItem.qml index acc2f8e..f3527b8 100644 --- a/qml/TerminalItem.qml +++ b/qml/TerminalItem.qml @@ -10,6 +10,11 @@ Item { signal executed + anchors { + left: parent.left + right: parent.right + } + height: elementList.height function select() { @@ -44,18 +49,6 @@ Item { } } - function widen() { - if ( terminal !== null ) { - terminal.columns += 1; - } - } - - function narrow() { - if ( terminal !== null ) { - terminal.columns -= 1; - } - } - function heighten() { if ( terminal !== null ) { terminal.lines += 1; @@ -71,14 +64,23 @@ Item { FocusScope { id: scope + anchors { + left: parent.left + right: parent.right + } + Column { id: elementList + anchors { + left: parent.left + right: parent.right + } + function createTerminal(program) { var terminalComponent = Qt.createComponent("qrc:/EmbeddedTerminal.qml"); var instantiateTerminal = function() { item.terminal = terminalComponent.createObject(elementList, { - "columns" : 90, "lines" : 20, "program" : program, "workingDirectory" : "$HOME", @@ -94,7 +96,10 @@ Item { } RowLayout { - width: item.width + anchors { + left: parent.left + right: parent.right + } Rectangle { id: highlighter -- cgit v1.2.3