aboutsummaryrefslogtreecommitdiff
path: root/qml
diff options
context:
space:
mode:
Diffstat (limited to 'qml')
-rw-r--r--qml/TerminalItem.qml24
-rw-r--r--qml/main.qml32
2 files changed, 28 insertions, 28 deletions
diff --git a/qml/TerminalItem.qml b/qml/TerminalItem.qml
index b417a6b..acc2f8e 100644
--- a/qml/TerminalItem.qml
+++ b/qml/TerminalItem.qml
@@ -44,6 +44,30 @@ 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;
+ }
+ }
+
+ function shorten() {
+ if ( terminal !== null ) {
+ terminal.lines -= 1;
+ }
+ }
+
FocusScope {
id: scope
diff --git a/qml/main.qml b/qml/main.qml
index 3a4bad2..a2355e9 100644
--- a/qml/main.qml
+++ b/qml/main.qml
@@ -159,52 +159,28 @@ ApplicationWindow {
id: heightenTerminalAction
shortcut: "Shift+J"
enabled: false
- onTriggered: {
- var current = terminalList.getCurrent().terminal;
-
- if ( current !== null ) {
- current.lines += 1;
- }
- }
+ onTriggered: terminalList.getCurrent().heighten()
}
Action {
id: shortenTerminalAction
shortcut: "Shift+K"
enabled: false
- onTriggered: {
- var current = terminalList.getCurrent().terminal;
-
- if ( current !== null ) {
- current.lines -= 1;
- }
- }
+ onTriggered: terminalList.getCurrent().shorten()
}
Action {
id: widenTerminalAction
shortcut: "Shift+L"
enabled: false
- onTriggered: {
- var current = terminalList.getCurrent().terminal;
-
- if ( current !== null ) {
- current.columns += 1;
- }
- }
+ onTriggered: terminalList.getCurrent().widen()
}
Action {
id: narrowTerminalAction
shortcut: "Shift+H"
enabled: false
- onTriggered: {
- var current = terminalList.getCurrent().terminal;
-
- if ( current !== null ) {
- current.columns -= 1;
- }
- }
+ onTriggered: terminalList.getCurrent().narrow()
}
Action {