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/EmbeddedTerminal.qml | 4 ++-- qml/Highlighter.qml | 19 ++++++++++++++----- 2 files changed, 16 insertions(+), 7 deletions(-) (limited to 'qml') diff --git a/qml/EmbeddedTerminal.qml b/qml/EmbeddedTerminal.qml index 9b89fd1..6d8b266 100644 --- a/qml/EmbeddedTerminal.qml +++ b/qml/EmbeddedTerminal.qml @@ -116,8 +116,8 @@ Item { } font { - family: settings.fontFamily - pointSize: 16 + family: settings.fontFamily + pointSize: settings.fontSize * 2 } color: settings.overlayFontColor 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