aboutsummaryrefslogtreecommitdiff
path: root/src/widget/augment/Highlighter.qml
diff options
context:
space:
mode:
authorAdrian Kummerlaender2015-12-15 19:53:18 +0100
committerAdrian Kummerlaender2015-12-15 19:53:18 +0100
commit55c66514c6e03bc731c7f5ae4d6f6a1e1d1ab601 (patch)
treea8725d321568ce978fd1638758d43299ee99656b /src/widget/augment/Highlighter.qml
parent012d8f7503d9d49ff33da621aee5fabd252e57f5 (diff)
downloadMetaTerm-master.tar
MetaTerm-master.tar.gz
MetaTerm-master.tar.bz2
MetaTerm-master.tar.lz
MetaTerm-master.tar.xz
MetaTerm-master.tar.zst
MetaTerm-master.zip
Separate widgets into primary and augmenting itemsHEADmaster
Diffstat (limited to 'src/widget/augment/Highlighter.qml')
-rw-r--r--src/widget/augment/Highlighter.qml24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/widget/augment/Highlighter.qml b/src/widget/augment/Highlighter.qml
new file mode 100644
index 0000000..53f308c
--- /dev/null
+++ b/src/widget/augment/Highlighter.qml
@@ -0,0 +1,24 @@
+import QtQuick 2.0
+
+Item {
+ function select() { bar.opacity = 1 }
+ function deselect() { bar.opacity = 0 }
+ function focus() { bar.color = settings.highlighter.focusColor }
+ function unfocus() { bar.color = settings.highlighter.defaultColor }
+
+ Rectangle {
+ id: bar
+
+ anchors.fill: parent
+
+ opacity: 0
+ color: settings.highlighter.defaultColor
+
+ Behavior on opacity {
+ NumberAnimation {
+ duration: 300
+ easing.type: Easing.OutCubic
+ }
+ }
+ }
+}