diff --git a/tests/resources.qrc b/tests/resources.qrc index 3e1ad02cf..040d54a0c 100644 --- a/tests/resources.qrc +++ b/tests/resources.qrc @@ -30,6 +30,7 @@ ui/modules/Linphone/Chat/Message.qml ui/modules/Linphone/Chat/OutgoingMessage.qml ui/modules/Linphone/Collapse.qml + ui/modules/Linphone/Colors.qml ui/modules/Linphone/Constants.qml ui/modules/Linphone/Contact/Avatar.qml ui/modules/Linphone/Contact/ContactDescription.qml diff --git a/tests/ui/modules/Linphone/Colors.qml b/tests/ui/modules/Linphone/Colors.qml new file mode 100644 index 000000000..3023533a1 --- /dev/null +++ b/tests/ui/modules/Linphone/Colors.qml @@ -0,0 +1,22 @@ +pragma Singleton +import QtQuick 2.7 + +QtObject { + property string a: 'transparent' + property string b: '#5E5E5F' // Pressed toolbar. + property string c: '#C5C5C5' // Released toolbar. + + property string d: '#5A585B' // Text color. + + property string e: '#DEDEDE' // Timeline separator + + property string f: '#808080' // Popup shadow. + + property string g: '#8E8E8E' // MenuEntry Normal. + property string h: '#707070' // MenuEntry Hovered. + property string i: '#FE5E00' // MenuEntry Pressed. + property string j: '#434343' // MenuEntry Selected. + + property string k: '#FFFFFF' // Text color. + property string l: '#000000' // Text color. +} diff --git a/tests/ui/modules/Linphone/Constants.qml b/tests/ui/modules/Linphone/Constants.qml index bada88ca0..b5c48cc83 100644 --- a/tests/ui/modules/Linphone/Constants.qml +++ b/tests/ui/modules/Linphone/Constants.qml @@ -4,24 +4,4 @@ import QtQuick 2.7 QtObject { property int zPopup: 999 property int zMax: 999999 - - property QtObject colors: QtObject { - property string a: 'transparent' - property string b: '#5E5E5F' // Pressed toolbar. - property string c: '#C5C5C5' // Released toolbar. - - property string d: '#5A585B' // Text color. - - property string e: '#DEDEDE' // Timeline separator - - property string f: '#808080' // Popup shadow. - - property string g: '#8E8E8E' // MenuEntry Normal. - property string h: '#707070' // MenuEntry Hovered. - property string i: '#FE5E00' // MenuEntry Pressed. - property string j: '#434343' // MenuEntry Selected. - - property string k: '#FFFFFF' // Text color. - property string l: '#000000' // Text color. - } } diff --git a/tests/ui/modules/Linphone/Styles/DialogStyle.qml b/tests/ui/modules/Linphone/Styles/DialogStyle.qml index 995462edf..dc7dc8dd2 100644 --- a/tests/ui/modules/Linphone/Styles/DialogStyle.qml +++ b/tests/ui/modules/Linphone/Styles/DialogStyle.qml @@ -22,6 +22,6 @@ QtObject { property int fontSize: 12 property int verticalMargin: 25 - property string color: Constants.colors.l + property string color: Colors.l } } diff --git a/tests/ui/modules/Linphone/Styles/ForceScrollBarStyle.qml b/tests/ui/modules/Linphone/Styles/ForceScrollBarStyle.qml index 514641986..2423693ed 100644 --- a/tests/ui/modules/Linphone/Styles/ForceScrollBarStyle.qml +++ b/tests/ui/modules/Linphone/Styles/ForceScrollBarStyle.qml @@ -5,7 +5,7 @@ import Linphone 1.0 QtObject { property Rectangle background: Rectangle { - color: Constants.colors.a + color: Colors.a } property Rectangle contentItem: Rectangle { @@ -15,8 +15,8 @@ QtObject { } property QtObject color: QtObject { - property string hovered: Constants.colors.h - property string normal: Constants.colors.c - property string pressed: Constants.colors.b + property string hovered: Colors.h + property string normal: Colors.c + property string pressed: Colors.b } } diff --git a/tests/ui/modules/Linphone/Styles/MenuStyle.qml b/tests/ui/modules/Linphone/Styles/MenuStyle.qml index 8c5445dce..2f8c78424 100644 --- a/tests/ui/modules/Linphone/Styles/MenuStyle.qml +++ b/tests/ui/modules/Linphone/Styles/MenuStyle.qml @@ -15,13 +15,13 @@ QtObject { property int spacing: 18 property string selectionIcon: 'right_arrow' - property string textColor: Constants.colors.k + property string textColor: Colors.k property QtObject color: QtObject { - property string normal: Constants.colors.g - property string hovered: Constants.colors.h - property string pressed: Constants.colors.i - property string selected: Constants.colors.j + property string normal: Colors.g + property string hovered: Colors.h + property string pressed: Colors.i + property string selected: Colors.j } } } diff --git a/tests/ui/modules/Linphone/Styles/PopupStyle.qml b/tests/ui/modules/Linphone/Styles/PopupStyle.qml index acdafb52d..86a466406 100644 --- a/tests/ui/modules/Linphone/Styles/PopupStyle.qml +++ b/tests/ui/modules/Linphone/Styles/PopupStyle.qml @@ -11,6 +11,6 @@ QtObject { property int samples: 15 property int verticalOffset: 2 - property string color: Constants.colors.f + property string color: Colors.f } } diff --git a/tests/ui/modules/Linphone/Styles/SearchBoxStyle.qml b/tests/ui/modules/Linphone/Styles/SearchBoxStyle.qml index 650c1a5a4..63b98384f 100644 --- a/tests/ui/modules/Linphone/Styles/SearchBoxStyle.qml +++ b/tests/ui/modules/Linphone/Styles/SearchBoxStyle.qml @@ -4,7 +4,7 @@ import QtQuick 2.7 import Linphone 1.0 QtObject { - property string shadowColor: Constants.colors.f + property string shadowColor: Colors.f property Rectangle searchFieldBackground: Rectangle { implicitHeight: 30 diff --git a/tests/ui/modules/Linphone/Styles/TimelineStyle.qml b/tests/ui/modules/Linphone/Styles/TimelineStyle.qml index 0556c76c6..7df775e83 100644 --- a/tests/ui/modules/Linphone/Styles/TimelineStyle.qml +++ b/tests/ui/modules/Linphone/Styles/TimelineStyle.qml @@ -12,13 +12,13 @@ QtObject { property int spacing: 16 property int topMargin: 10 - property string color: Constants.colors.d + property string color: Colors.d property string icon: 'history' } property QtObject separator: QtObject { property int height: 1 - property string color: Constants.colors.e + property string color: Colors.e } } diff --git a/tests/ui/modules/Linphone/qmldir b/tests/ui/modules/Linphone/qmldir index e6ab51e54..5548d64ca 100644 --- a/tests/ui/modules/Linphone/qmldir +++ b/tests/ui/modules/Linphone/qmldir @@ -2,6 +2,7 @@ module Linphone # Constants ---------------------------------------------------------- +singleton Colors 1.0 Colors.qml singleton Constants 1.0 Constants.qml # Components ---------------------------------------------------------