From cf61cd4065e23756b7ca00ce41164024a731982e Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Tue, 24 Jul 2018 15:25:36 +0200 Subject: [PATCH] feat(Colors): use k color only on backgrounds like home, settings, ... --- src/components/other/colors/Colors.hpp | 7 +++++-- ui/dev-modules/Colors/Colors.qml | 1 - .../Common/Styles/Form/Buttons/SmallButtonStyle.qml | 2 +- .../Common/Styles/Form/Buttons/TextButtonAStyle.qml | 8 ++++---- .../Common/Styles/Form/Buttons/TextButtonBStyle.qml | 8 ++++---- ui/modules/Common/Styles/Form/ComboBoxStyle.qml | 2 +- ui/modules/Common/Styles/Form/DroppableTextAreaStyle.qml | 4 ++-- ui/modules/Common/Styles/Form/SwitchStyle.qml | 4 ++-- ui/modules/Common/Styles/Form/Tab/TabButtonStyle.qml | 8 ++++---- ui/modules/Common/Styles/Menus/ApplicationMenuStyle.qml | 4 ++-- .../Common/Styles/Menus/DropDownStaticMenuStyle.qml | 2 +- ui/modules/Common/Styles/Menus/MenuItemStyle.qml | 2 +- ui/modules/Common/Styles/Menus/MenuStyle.qml | 2 +- ui/modules/Common/Styles/Tooltip/TooltipStyle.qml | 2 +- ui/modules/Linphone/Styles/Calls/CallsStyle.qml | 4 ++-- ui/modules/Linphone/Styles/Chat/ChatStyle.qml | 4 ++-- ui/modules/Linphone/Styles/Contact/AvatarStyle.qml | 2 +- .../Linphone/Styles/Contact/MessagesCounterStyle.qml | 2 +- .../Linphone/Styles/Menus/SipAddressesMenuStyle.qml | 2 +- ui/modules/Linphone/Styles/TelKeypad/TelKeypadStyle.qml | 2 +- ui/modules/Linphone/Styles/Timeline/TimelineStyle.qml | 6 +++--- ui/modules/Linphone/Styles/View/SipAddressesViewStyle.qml | 6 +++--- ui/views/App/Styles/Calls/CallStyle.qml | 2 +- ui/views/App/Styles/Calls/CallsWindowStyle.qml | 4 ++-- ui/views/App/Styles/Main/ConversationStyle.qml | 2 +- 25 files changed, 47 insertions(+), 45 deletions(-) diff --git a/src/components/other/colors/Colors.hpp b/src/components/other/colors/Colors.hpp index 19c8a1335..955554b26 100644 --- a/src/components/other/colors/Colors.hpp +++ b/src/components/other/colors/Colors.hpp @@ -73,7 +73,10 @@ class Colors : public QObject { ADD_COLOR(i, "#FE5E00"); ADD_COLOR(j, "#4B5964"); + + // Popups, home, call, assistant and settings background. ADD_COLOR(k, "#FFFFFF"); + ADD_COLOR(l, "#000000"); // Primary color for clicked items. @@ -85,7 +88,7 @@ class Colors : public QObject { // Progress bar. ADD_COLOR(p, "#17A81A"); - // Field background. + // Fields, backgrounds and text color on some items. ADD_COLOR(q, "#FFFFFF"); // Field error. @@ -95,9 +98,9 @@ class Colors : public QObject { ADD_COLOR_WITH_ALPHA(g, 20); ADD_COLOR_WITH_ALPHA(g, 90); ADD_COLOR_WITH_ALPHA(i, 30); - ADD_COLOR_WITH_ALPHA(k, 50); ADD_COLOR_WITH_ALPHA(l, 50); ADD_COLOR_WITH_ALPHA(l, 80); + ADD_COLOR_WITH_ALPHA(q, 50); public: Colors (QObject *parent = Q_NULLPTR); diff --git a/ui/dev-modules/Colors/Colors.qml b/ui/dev-modules/Colors/Colors.qml index 0d1f00369..d8e4165a9 100644 --- a/ui/dev-modules/Colors/Colors.qml +++ b/ui/dev-modules/Colors/Colors.qml @@ -20,7 +20,6 @@ QtObject { property color j: '#000000' property color j75: '#000000' property color k: '#000000' - property color k50: '#000000' property color l: '#000000' property color l50: '#000000' property color l80: '#000000' diff --git a/ui/modules/Common/Styles/Form/Buttons/SmallButtonStyle.qml b/ui/modules/Common/Styles/Form/Buttons/SmallButtonStyle.qml index f1d2aa3ab..7ee91ba76 100644 --- a/ui/modules/Common/Styles/Form/Buttons/SmallButtonStyle.qml +++ b/ui/modules/Common/Styles/Form/Buttons/SmallButtonStyle.qml @@ -22,7 +22,7 @@ QtObject { } property QtObject text: QtObject { - property color color: Colors.k + property color color: Colors.q property int pointSize: Units.dp * 8 } } diff --git a/ui/modules/Common/Styles/Form/Buttons/TextButtonAStyle.qml b/ui/modules/Common/Styles/Form/Buttons/TextButtonAStyle.qml index 7233ed8a2..fc2f5f50e 100644 --- a/ui/modules/Common/Styles/Form/Buttons/TextButtonAStyle.qml +++ b/ui/modules/Common/Styles/Form/Buttons/TextButtonAStyle.qml @@ -14,9 +14,9 @@ QtObject { } property QtObject textColor: QtObject { - property color disabled: Colors.k - property color hovered: Colors.k - property color normal: Colors.k - property color pressed: Colors.k + property color disabled: Colors.q + property color hovered: Colors.q + property color normal: Colors.q + property color pressed: Colors.q } } diff --git a/ui/modules/Common/Styles/Form/Buttons/TextButtonBStyle.qml b/ui/modules/Common/Styles/Form/Buttons/TextButtonBStyle.qml index 9c703d374..47088c7fd 100644 --- a/ui/modules/Common/Styles/Form/Buttons/TextButtonBStyle.qml +++ b/ui/modules/Common/Styles/Form/Buttons/TextButtonBStyle.qml @@ -14,9 +14,9 @@ QtObject { } property QtObject textColor: QtObject { - property color disabled: Colors.k - property color hovered: Colors.k - property color normal: Colors.k - property color pressed: Colors.k + property color disabled: Colors.q + property color hovered: Colors.q + property color normal: Colors.q + property color pressed: Colors.q } } diff --git a/ui/modules/Common/Styles/Form/ComboBoxStyle.qml b/ui/modules/Common/Styles/Form/ComboBoxStyle.qml index e6d913a64..9f922b742 100644 --- a/ui/modules/Common/Styles/Form/ComboBoxStyle.qml +++ b/ui/modules/Common/Styles/Form/ComboBoxStyle.qml @@ -38,7 +38,7 @@ QtObject { property QtObject delegate: QtObject { property QtObject color: QtObject { property color hovered: Colors.o - property color normal: Colors.k + property color normal: Colors.q } property QtObject contentItem: QtObject { diff --git a/ui/modules/Common/Styles/Form/DroppableTextAreaStyle.qml b/ui/modules/Common/Styles/Form/DroppableTextAreaStyle.qml index 136e2cd0a..438a84d9b 100644 --- a/ui/modules/Common/Styles/Form/DroppableTextAreaStyle.qml +++ b/ui/modules/Common/Styles/Form/DroppableTextAreaStyle.qml @@ -7,7 +7,7 @@ import Units 1.0 // ============================================================================= QtObject { - property color backgroundColor: Colors.k + property color backgroundColor: Colors.q property QtObject fileChooserButton: QtObject { property int margins: 6 @@ -15,7 +15,7 @@ QtObject { } property QtObject hoverContent: QtObject { - property color backgroundColor: Colors.k + property color backgroundColor: Colors.q property QtObject text: QtObject { property color color: Colors.i diff --git a/ui/modules/Common/Styles/Form/SwitchStyle.qml b/ui/modules/Common/Styles/Form/SwitchStyle.qml index fb86364c1..7f060efbf 100644 --- a/ui/modules/Common/Styles/Form/SwitchStyle.qml +++ b/ui/modules/Common/Styles/Form/SwitchStyle.qml @@ -25,7 +25,7 @@ QtObject { property QtObject color: QtObject { property color checked: Colors.i property color disabled: Colors.e - property color normal: Colors.k + property color normal: Colors.q } } @@ -44,7 +44,7 @@ QtObject { property QtObject color: QtObject { property color disabled: Colors.e property color pressed: Colors.c - property color normal: Colors.k + property color normal: Colors.q } } } diff --git a/ui/modules/Common/Styles/Form/Tab/TabButtonStyle.qml b/ui/modules/Common/Styles/Form/Tab/TabButtonStyle.qml index ec5ae1b19..48cf670b2 100644 --- a/ui/modules/Common/Styles/Form/Tab/TabButtonStyle.qml +++ b/ui/modules/Common/Styles/Form/Tab/TabButtonStyle.qml @@ -28,10 +28,10 @@ QtObject { property int rightPadding: 10 property QtObject color: QtObject { - property color disabled: Colors.k - property color hovered: Colors.k - property color normal: Colors.k - property color pressed: Colors.k + property color disabled: Colors.q + property color hovered: Colors.q + property color normal: Colors.q + property color pressed: Colors.q property color selected: Colors.i } } diff --git a/ui/modules/Common/Styles/Menus/ApplicationMenuStyle.qml b/ui/modules/Common/Styles/Menus/ApplicationMenuStyle.qml index f1e65c990..4c8975168 100644 --- a/ui/modules/Common/Styles/Menus/ApplicationMenuStyle.qml +++ b/ui/modules/Common/Styles/Menus/ApplicationMenuStyle.qml @@ -32,8 +32,8 @@ QtObject { property int pointSize: Units.dp * 11 property QtObject color: QtObject { - property color normal: Colors.k50 - property color selected: Colors.k + property color normal: Colors.q50 + property color selected: Colors.q } } } diff --git a/ui/modules/Common/Styles/Menus/DropDownStaticMenuStyle.qml b/ui/modules/Common/Styles/Menus/DropDownStaticMenuStyle.qml index 33ae2ee89..558c5d4c9 100644 --- a/ui/modules/Common/Styles/Menus/DropDownStaticMenuStyle.qml +++ b/ui/modules/Common/Styles/Menus/DropDownStaticMenuStyle.qml @@ -20,7 +20,7 @@ QtObject { } property QtObject text: QtObject { - property color color: Colors.k + property color color: Colors.q property int pointSize: Units.dp * 9 } } diff --git a/ui/modules/Common/Styles/Menus/MenuItemStyle.qml b/ui/modules/Common/Styles/Menus/MenuItemStyle.qml index 69e8e25b8..f8afdb692 100644 --- a/ui/modules/Common/Styles/Menus/MenuItemStyle.qml +++ b/ui/modules/Common/Styles/Menus/MenuItemStyle.qml @@ -15,7 +15,7 @@ QtObject { property QtObject color: QtObject { property color hovered: Colors.o - property color normal: Colors.k + property color normal: Colors.q property color pressed: Colors.o } } diff --git a/ui/modules/Common/Styles/Menus/MenuStyle.qml b/ui/modules/Common/Styles/Menus/MenuStyle.qml index 6818d00d5..bd33aa11a 100644 --- a/ui/modules/Common/Styles/Menus/MenuStyle.qml +++ b/ui/modules/Common/Styles/Menus/MenuStyle.qml @@ -6,6 +6,6 @@ import Colors 1.0 // ============================================================================= QtObject { - property color color: Colors.k + property color color: Colors.q property int width: 130 } diff --git a/ui/modules/Common/Styles/Tooltip/TooltipStyle.qml b/ui/modules/Common/Styles/Tooltip/TooltipStyle.qml index f874aac31..02b35665e 100644 --- a/ui/modules/Common/Styles/Tooltip/TooltipStyle.qml +++ b/ui/modules/Common/Styles/Tooltip/TooltipStyle.qml @@ -8,7 +8,7 @@ import Units 1.0 QtObject { property color backgroundColor: Colors.g - property color color: Colors.k + property color color: Colors.q property int arrowSize: 8 property int delay: 1000 property int pointSize: Units.dp * 9 diff --git a/ui/modules/Linphone/Styles/Calls/CallsStyle.qml b/ui/modules/Linphone/Styles/Calls/CallsStyle.qml index c9001c799..a17d7ac3a 100644 --- a/ui/modules/Linphone/Styles/Calls/CallsStyle.qml +++ b/ui/modules/Linphone/Styles/Calls/CallsStyle.qml @@ -25,12 +25,12 @@ QtObject { property QtObject sipAddressColor: QtObject { property color normal: Colors.n - property color selected: Colors.k + property color selected: Colors.q } property QtObject usernameColor: QtObject { property color normal: Colors.j - property color selected: Colors.k + property color selected: Colors.q } } } diff --git a/ui/modules/Linphone/Styles/Chat/ChatStyle.qml b/ui/modules/Linphone/Styles/Chat/ChatStyle.qml index b19bf155b..1ee746bd9 100644 --- a/ui/modules/Linphone/Styles/Chat/ChatStyle.qml +++ b/ui/modules/Linphone/Styles/Chat/ChatStyle.qml @@ -7,7 +7,7 @@ import Units 1.0 // ============================================================================= QtObject { - property color color: Colors.k + property color color: Colors.q property QtObject sectionHeading: QtObject { property int padding: 5 @@ -84,7 +84,7 @@ QtObject { } property QtObject text: QtObject { - property color color: Colors.k + property color color: Colors.q } } diff --git a/ui/modules/Linphone/Styles/Contact/AvatarStyle.qml b/ui/modules/Linphone/Styles/Contact/AvatarStyle.qml index ea65795b5..4aa8f1744 100644 --- a/ui/modules/Linphone/Styles/Contact/AvatarStyle.qml +++ b/ui/modules/Linphone/Styles/Contact/AvatarStyle.qml @@ -10,7 +10,7 @@ QtObject { property color backgroundColor: Colors.d property QtObject initials: QtObject { - property color color: Colors.k + property color color: Colors.q property int pointSize: Units.dp * 10 property int ratio: 30 } diff --git a/ui/modules/Linphone/Styles/Contact/MessagesCounterStyle.qml b/ui/modules/Linphone/Styles/Contact/MessagesCounterStyle.qml index 70bb948ec..13999f36d 100644 --- a/ui/modules/Linphone/Styles/Contact/MessagesCounterStyle.qml +++ b/ui/modules/Linphone/Styles/Contact/MessagesCounterStyle.qml @@ -16,7 +16,7 @@ QtObject { } property QtObject text: QtObject { - property color color: Colors.k + property color color: Colors.q property int pointSize: Units.dp * 7 } } diff --git a/ui/modules/Linphone/Styles/Menus/SipAddressesMenuStyle.qml b/ui/modules/Linphone/Styles/Menus/SipAddressesMenuStyle.qml index 5f7e08b4b..a1cda29b2 100644 --- a/ui/modules/Linphone/Styles/Menus/SipAddressesMenuStyle.qml +++ b/ui/modules/Linphone/Styles/Menus/SipAddressesMenuStyle.qml @@ -23,7 +23,7 @@ QtObject { } property QtObject text: QtObject { - property color color: Colors.k + property color color: Colors.q property int pointSize: Units.dp * 10 } } diff --git a/ui/modules/Linphone/Styles/TelKeypad/TelKeypadStyle.qml b/ui/modules/Linphone/Styles/TelKeypad/TelKeypadStyle.qml index b2aef9def..30105ba8f 100644 --- a/ui/modules/Linphone/Styles/TelKeypad/TelKeypadStyle.qml +++ b/ui/modules/Linphone/Styles/TelKeypad/TelKeypadStyle.qml @@ -15,7 +15,7 @@ QtObject { property QtObject button: QtObject { property QtObject color: QtObject { - property color normal: Colors.k + property color normal: Colors.q property color pressed: Colors.i } diff --git a/ui/modules/Linphone/Styles/Timeline/TimelineStyle.qml b/ui/modules/Linphone/Styles/Timeline/TimelineStyle.qml index 53c9b3dfe..9cb3ce8b0 100644 --- a/ui/modules/Linphone/Styles/Timeline/TimelineStyle.qml +++ b/ui/modules/Linphone/Styles/Timeline/TimelineStyle.qml @@ -7,7 +7,7 @@ import Units 1.0 // ============================================================================= QtObject { - property color color: Colors.k + property color color: Colors.q property QtObject contact: QtObject { property int height: 60 @@ -21,14 +21,14 @@ QtObject { property QtObject sipAddress: QtObject { property QtObject color: QtObject { property color normal: Colors.n - property color selected: Colors.k + property color selected: Colors.q } } property QtObject username: QtObject { property QtObject color: QtObject { property color normal: Colors.j - property color selected: Colors.k + property color selected: Colors.q } } } diff --git a/ui/modules/Linphone/Styles/View/SipAddressesViewStyle.qml b/ui/modules/Linphone/Styles/View/SipAddressesViewStyle.qml index 25a6ecde1..f160136f5 100644 --- a/ui/modules/Linphone/Styles/View/SipAddressesViewStyle.qml +++ b/ui/modules/Linphone/Styles/View/SipAddressesViewStyle.qml @@ -14,7 +14,7 @@ QtObject { property QtObject color: QtObject { property color hovered: Colors.o - property color normal: Colors.k + property color normal: Colors.q } property QtObject indicator: QtObject { @@ -46,8 +46,8 @@ QtObject { property int pointSize: Units.dp * 9 property QtObject color: QtObject { - property color normal: Colors.k - property color pressed: Colors.k + property color normal: Colors.q + property color pressed: Colors.q } } } diff --git a/ui/views/App/Styles/Calls/CallStyle.qml b/ui/views/App/Styles/Calls/CallStyle.qml index efedd5205..d9b786ac2 100644 --- a/ui/views/App/Styles/Calls/CallStyle.qml +++ b/ui/views/App/Styles/Calls/CallStyle.qml @@ -43,7 +43,7 @@ QtObject { property color color: Colors.g90 property QtObject text: QtObject { - property color color: Colors.k + property color color: Colors.q property int pointSizeFactor: 10 } } diff --git a/ui/views/App/Styles/Calls/CallsWindowStyle.qml b/ui/views/App/Styles/Calls/CallsWindowStyle.qml index 4256c13f9..1b3a80ad8 100644 --- a/ui/views/App/Styles/Calls/CallsWindowStyle.qml +++ b/ui/views/App/Styles/Calls/CallsWindowStyle.qml @@ -14,13 +14,13 @@ QtObject { } property QtObject callsList: QtObject { - property color color: Colors.k + property color color: Colors.q property int defaultWidth: 250 property int maximumWidth: 250 property int minimumWidth: 110 property QtObject header: QtObject { - property color color1: Colors.k + property color color1: Colors.q property color color2: Colors.f property int height: 60 property int iconSize: 40 diff --git a/ui/views/App/Styles/Main/ConversationStyle.qml b/ui/views/App/Styles/Main/ConversationStyle.qml index e2dad6cdd..0cbc42ecc 100644 --- a/ui/views/App/Styles/Main/ConversationStyle.qml +++ b/ui/views/App/Styles/Main/ConversationStyle.qml @@ -37,7 +37,7 @@ QtObject { } property QtObject filters: QtObject { - property color backgroundColor: Colors.k + property color backgroundColor: Colors.q property int height: 51 property int leftMargin: 40