From 42375e9db8617fa2600e96a852a2b2a79390d407 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Tue, 24 Jul 2018 14:15:48 +0200 Subject: [PATCH] feat(Colors): add a color for field backgrounds --- src/components/other/colors/Colors.hpp | 15 +++++++++++++++ ui/modules/Common/Styles/Form/ComboBoxStyle.qml | 2 +- .../Styles/Form/Fields/TextAreaFieldStyle.qml | 2 +- .../Common/Styles/Form/Fields/TextFieldStyle.qml | 2 +- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/components/other/colors/Colors.hpp b/src/components/other/colors/Colors.hpp index af368d65e..19c8a1335 100644 --- a/src/components/other/colors/Colors.hpp +++ b/src/components/other/colors/Colors.hpp @@ -59,6 +59,8 @@ class Colors : public QObject { Q_PROPERTY(QStringList colorNames READ getColorNames CONSTANT); ADD_COLOR(a, "transparent"); + + // Primary color. ADD_COLOR(b, "#D64D00"); ADD_COLOR(c, "#CBCBCB"); ADD_COLOR(d, "#5A585B"); @@ -66,15 +68,27 @@ class Colors : public QObject { ADD_COLOR(f, "#E8E8E8"); ADD_COLOR(g, "#6B7A86"); ADD_COLOR(h, "#687680"); + + // Primary color for hovered items. ADD_COLOR(i, "#FE5E00"); + ADD_COLOR(j, "#4B5964"); ADD_COLOR(k, "#FFFFFF"); ADD_COLOR(l, "#000000"); + + // Primary color for clicked items. ADD_COLOR(m, "#FF8600"); + ADD_COLOR(n, "#A1A1A1"); ADD_COLOR(o, "#D0D8DE"); + + // Progress bar. ADD_COLOR(p, "#17A81A"); + // Field background. + ADD_COLOR(q, "#FFFFFF"); + + // Field error. ADD_COLOR(error, "#FF0000"); ADD_COLOR_WITH_ALPHA(g, 10); @@ -107,6 +121,7 @@ signals: void colorTnChanged (const QColor &color); void colorToChanged (const QColor &color); void colorTpChanged (const QColor &color); + void colorTqChanged (const QColor &color); void colorTerrorChanged (const QColor &color); diff --git a/ui/modules/Common/Styles/Form/ComboBoxStyle.qml b/ui/modules/Common/Styles/Form/ComboBoxStyle.qml index 131a8306d..e6d913a64 100644 --- a/ui/modules/Common/Styles/Form/ComboBoxStyle.qml +++ b/ui/modules/Common/Styles/Form/ComboBoxStyle.qml @@ -19,7 +19,7 @@ QtObject { } property QtObject color: QtObject { - property color normal: Colors.k + property color normal: Colors.q property color readOnly: Colors.e } } diff --git a/ui/modules/Common/Styles/Form/Fields/TextAreaFieldStyle.qml b/ui/modules/Common/Styles/Form/Fields/TextAreaFieldStyle.qml index a8791bf97..c4021b2e5 100644 --- a/ui/modules/Common/Styles/Form/Fields/TextAreaFieldStyle.qml +++ b/ui/modules/Common/Styles/Form/Fields/TextAreaFieldStyle.qml @@ -19,7 +19,7 @@ QtObject { } property QtObject color: QtObject { - property color normal: Colors.k + property color normal: Colors.q property color readOnly: Colors.e } } diff --git a/ui/modules/Common/Styles/Form/Fields/TextFieldStyle.qml b/ui/modules/Common/Styles/Form/Fields/TextFieldStyle.qml index e007ca82d..837fa28d7 100644 --- a/ui/modules/Common/Styles/Form/Fields/TextFieldStyle.qml +++ b/ui/modules/Common/Styles/Form/Fields/TextFieldStyle.qml @@ -24,7 +24,7 @@ QtObject { } property QtObject color: QtObject { - property color normal: Colors.k + property color normal: Colors.q property color readOnly: Colors.e } }