aboutsummaryrefslogtreecommitdiff
path: root/qml/Highlighter.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/Highlighter.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/Highlighter.qml')
-rw-r--r--qml/Highlighter.qml24
1 files changed, 24 insertions, 0 deletions
diff --git a/qml/Highlighter.qml b/qml/Highlighter.qml
new file mode 100644
index 0000000..8d42054
--- /dev/null
+++ b/qml/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 = "#352F6A" }
+ function unfocus() { bar.color = "#909636" }
+
+ Rectangle {
+ id: bar
+
+ anchors.fill: parent
+
+ opacity: 0
+ color: "#909636"
+
+ Behavior on opacity {
+ NumberAnimation {
+ duration: 300
+ easing.type: Easing.OutCubic
+ }
+ }
+ }
+}