aboutsummaryrefslogtreecommitdiff
path: root/qml/EmbeddedTerminal.qml
diff options
context:
space:
mode:
authorAdrian Kummerlaender2015-07-26 22:23:08 +0200
committerAdrian Kummerlaender2015-07-26 22:23:08 +0200
commite2d2c1232d10511693d058e0790183ba57ecd5d1 (patch)
treeb783c60b19eadc8db54c54d7a4ab7b0ee5c5f504 /qml/EmbeddedTerminal.qml
parent3af7553b2e7cf4f301d61eeac563f07bd405c66c (diff)
downloadMetaTerm-e2d2c1232d10511693d058e0790183ba57ecd5d1.tar
MetaTerm-e2d2c1232d10511693d058e0790183ba57ecd5d1.tar.gz
MetaTerm-e2d2c1232d10511693d058e0790183ba57ecd5d1.tar.bz2
MetaTerm-e2d2c1232d10511693d058e0790183ba57ecd5d1.tar.lz
MetaTerm-e2d2c1232d10511693d058e0790183ba57ecd5d1.tar.xz
MetaTerm-e2d2c1232d10511693d058e0790183ba57ecd5d1.tar.zst
MetaTerm-e2d2c1232d10511693d058e0790183ba57ecd5d1.zip
Extended available settings and changed them to value properties
Otherwise each runtime change of a property leads to storing the new value to disk which we don't want - setting changes should be explicit and visible as such.
Diffstat (limited to 'qml/EmbeddedTerminal.qml')
-rw-r--r--qml/EmbeddedTerminal.qml29
1 files changed, 15 insertions, 14 deletions
diff --git a/qml/EmbeddedTerminal.qml b/qml/EmbeddedTerminal.qml
index ef53b12..7e021b3 100644
--- a/qml/EmbeddedTerminal.qml
+++ b/qml/EmbeddedTerminal.qml
@@ -9,21 +9,22 @@ Item {
property string program
property string workingDirectory
- property int lines : 20
- property int frameWidth : 10
-
- height: terminal.height
- width: parent.width - frameWidth
-
Settings {
+ id: settings
category: "terminal"
- property alias frameWidth : item.frameWidth
- property alias colorScheme : terminal.colorScheme
- property alias fontFamily : terminal.font.family
- property alias fontSize : terminal.font.pointSize
+ property int initialLines : 20
+ property int frameWidth : 10
+ property int fontSize : 8
+ property string fontFamily : "Monospace"
+ property string colorScheme : "cool-retro-term"
}
+ property int lines : settings.initialLines
+
+ height: terminal.height
+ width: parent.width - settings.frameWidth
+
function select() { highlighter.select() }
function deselect() { highlighter.deselect() }
@@ -40,7 +41,7 @@ Item {
Highlighter {
id: highlighter
- width: item.frameWidth
+ width: settings.frameWidth
Layout.fillHeight: true
}
@@ -48,14 +49,14 @@ Item {
id: terminal
font {
- family: "Monospace"
- pointSize: 8
+ family: settings.fontFamily
+ pointSize: settings.fontSize
}
Layout.fillWidth: true
Layout.preferredHeight: fontMetrics.height * item.lines
- colorScheme: "cool-retro-term"
+ colorScheme: settings.colorScheme
session: QMLTermSession {
initialWorkingDirectory: item.workingDirectory