From aca84cb4ef24c1b4b9e3d53126081db8b14855e2 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Wed, 12 Aug 2015 20:24:52 +0200 Subject: Change color setting types to `string` While `color` would obviously be the correct type to store a color value it is serialized as a `QVariant` value which is not easily changeable by the user. This requirement is satisfied by `string` and as such this type is - at this point in time - a superior replacement of `color`. Should the QML settings module be changed to serialize color values in a human readable fashion these types should be changed back to their formally correct value. --- qml/CommandInput.qml | 6 +++--- qml/EmbeddedTerminal.qml | 4 ++-- qml/Highlighter.qml | 4 ++-- qml/TerminalItem.qml | 2 +- qml/main.qml | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/qml/CommandInput.qml b/qml/CommandInput.qml index 1f67f7c..5fbde77 100644 --- a/qml/CommandInput.qml +++ b/qml/CommandInput.qml @@ -17,11 +17,11 @@ Item { id: settings category: "command" - property color background : "black" + property string background : "black" property int fontSize : 12 property string fontFamily : "Monospace" - property color fontColor : "white" - property color errorColor : "red" + property string fontColor : "white" + property string errorColor : "red" } onVisibleChanged: container.reset() diff --git a/qml/EmbeddedTerminal.qml b/qml/EmbeddedTerminal.qml index d2cab9e..6d0dc6e 100644 --- a/qml/EmbeddedTerminal.qml +++ b/qml/EmbeddedTerminal.qml @@ -18,8 +18,8 @@ Item { property int fontSize : 8 property string fontFamily : "Monospace" property string colorScheme : "cool-retro-term" - property color overlayBackground : "black" - property color overlayFontColor : "white" + property string overlayBackground : "black" + property string overlayFontColor : "white" } property int lines : settings.initialLines diff --git a/qml/Highlighter.qml b/qml/Highlighter.qml index cfb8492..e42aeb1 100644 --- a/qml/Highlighter.qml +++ b/qml/Highlighter.qml @@ -6,8 +6,8 @@ Item { id: settings category: "highlighter" - property color defaultColor : "#909636" - property color focusColor : "#352F6A" + property string defaultColor : "#909636" + property string focusColor : "#352F6A" } function select() { bar.opacity = 1 } diff --git a/qml/TerminalItem.qml b/qml/TerminalItem.qml index 5ab658a..fc7bbf7 100644 --- a/qml/TerminalItem.qml +++ b/qml/TerminalItem.qml @@ -17,7 +17,7 @@ Item { property int fontSize : 18 property string fontFamily : "Monospace" - property color fontColor : "white" + property string fontColor : "white" } anchors { diff --git a/qml/main.qml b/qml/main.qml index f455120..f7673dc 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -13,7 +13,7 @@ ApplicationWindow { id: settings category: "window" - property color background : "#161616" + property string background : "#161616" } color: settings.background -- cgit v1.2.3