From b563c10102f2211567daaa6570f54d312753408d Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Tue, 4 Aug 2015 15:45:01 +0200 Subject: Added highlighter default and focus colors to settings --- qml/Highlighter.qml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'qml/Highlighter.qml') diff --git a/qml/Highlighter.qml b/qml/Highlighter.qml index 8d42054..cfb8492 100644 --- a/qml/Highlighter.qml +++ b/qml/Highlighter.qml @@ -1,10 +1,19 @@ import QtQuick 2.0 +import Qt.labs.settings 1.0 Item { - function select() { bar.opacity = 1 } - function deselect() { bar.opacity = 0 } - function focus() { bar.color = "#352F6A" } - function unfocus() { bar.color = "#909636" } + Settings { + id: settings + category: "highlighter" + + property color defaultColor : "#909636" + property color focusColor : "#352F6A" + } + + function select() { bar.opacity = 1 } + function deselect() { bar.opacity = 0 } + function focus() { bar.color = settings.focusColor } + function unfocus() { bar.color = settings.defaultColor } Rectangle { id: bar @@ -12,7 +21,7 @@ Item { anchors.fill: parent opacity: 0 - color: "#909636" + color: settings.defaultColor Behavior on opacity { NumberAnimation { -- cgit v1.2.3