mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-07 15:08:24 +00:00
feat(app): use Colors instead of Constants.colors in qml styles
This commit is contained in:
parent
a7423b4b99
commit
09b430340c
10 changed files with 38 additions and 34 deletions
|
|
@ -30,6 +30,7 @@
|
|||
<file>ui/modules/Linphone/Chat/Message.qml</file>
|
||||
<file>ui/modules/Linphone/Chat/OutgoingMessage.qml</file>
|
||||
<file>ui/modules/Linphone/Collapse.qml</file>
|
||||
<file>ui/modules/Linphone/Colors.qml</file>
|
||||
<file>ui/modules/Linphone/Constants.qml</file>
|
||||
<file>ui/modules/Linphone/Contact/Avatar.qml</file>
|
||||
<file>ui/modules/Linphone/Contact/ContactDescription.qml</file>
|
||||
|
|
|
|||
22
tests/ui/modules/Linphone/Colors.qml
Normal file
22
tests/ui/modules/Linphone/Colors.qml
Normal file
|
|
@ -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.
|
||||
}
|
||||
|
|
@ -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.
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,6 @@ QtObject {
|
|||
property int fontSize: 12
|
||||
property int verticalMargin: 25
|
||||
|
||||
property string color: Constants.colors.l
|
||||
property string color: Colors.l
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,6 @@ QtObject {
|
|||
property int samples: 15
|
||||
property int verticalOffset: 2
|
||||
|
||||
property string color: Constants.colors.f
|
||||
property string color: Colors.f
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ module Linphone
|
|||
|
||||
# Constants ----------------------------------------------------------
|
||||
|
||||
singleton Colors 1.0 Colors.qml
|
||||
singleton Constants 1.0 Constants.qml
|
||||
|
||||
# Components ---------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue