aboutsummaryrefslogtreecommitdiff
path: root/qml/EmbeddedTerminal.qml
diff options
context:
space:
mode:
authorAdrian Kummerlaender2015-07-25 21:53:01 +0200
committerAdrian Kummerlaender2015-07-25 21:53:01 +0200
commit311dd6e4e885ff5833756fd9cfa6e8c9c4a8668a (patch)
treeab5019fe014a2d6be67c5c443f6ea0be8b25acaf /qml/EmbeddedTerminal.qml
parent1ed6dfcd2eb9878b2ad25c42358d9a21839a1951 (diff)
downloadMetaTerm-311dd6e4e885ff5833756fd9cfa6e8c9c4a8668a.tar
MetaTerm-311dd6e4e885ff5833756fd9cfa6e8c9c4a8668a.tar.gz
MetaTerm-311dd6e4e885ff5833756fd9cfa6e8c9c4a8668a.tar.bz2
MetaTerm-311dd6e4e885ff5833756fd9cfa6e8c9c4a8668a.tar.lz
MetaTerm-311dd6e4e885ff5833756fd9cfa6e8c9c4a8668a.tar.xz
MetaTerm-311dd6e4e885ff5833756fd9cfa6e8c9c4a8668a.tar.zst
MetaTerm-311dd6e4e885ff5833756fd9cfa6e8c9c4a8668a.zip
Extracted highlighter rectangles into separate component
Diffstat (limited to 'qml/EmbeddedTerminal.qml')
-rw-r--r--qml/EmbeddedTerminal.qml19
1 files changed, 3 insertions, 16 deletions
diff --git a/qml/EmbeddedTerminal.qml b/qml/EmbeddedTerminal.qml
index 2e58fa9..aa22328 100644
--- a/qml/EmbeddedTerminal.qml
+++ b/qml/EmbeddedTerminal.qml
@@ -26,25 +26,11 @@ Item {
spacing: 0
- Rectangle {
+ Highlighter {
id: highlighter
width: item.frameWidth
Layout.fillHeight: true
-
- color: "#909636"
-
- Behavior on opacity {
- NumberAnimation {
- duration: 300
- easing.type: Easing.OutCubic
- }
- }
-
- function select() { opacity = 1 }
- function deselect() { opacity = 0 }
- function focus() { color = "#352F6A" }
- function unfocus() { color = "#909636" }
}
QMLTermWidget {
@@ -73,7 +59,7 @@ Item {
}
}
- onTermGetFocus: highlighter.focus()
+ onTermGetFocus: highlighter.focus()
onTermLostFocus: highlighter.unfocus()
MouseArea {
@@ -84,6 +70,7 @@ Item {
Component.onCompleted: {
forceActiveFocus();
+ highlighter.select();
session.startShellProgram();
}
}