diff --git a/tests/assets/images/micro_off_hovered.svg b/tests/assets/images/micro_off_hovered.svg
new file mode 100644
index 000000000..da770932a
--- /dev/null
+++ b/tests/assets/images/micro_off_hovered.svg
@@ -0,0 +1,13 @@
+
+
\ No newline at end of file
diff --git a/tests/assets/images/micro_off_normal.svg b/tests/assets/images/micro_off_normal.svg
new file mode 100644
index 000000000..0b6144c27
--- /dev/null
+++ b/tests/assets/images/micro_off_normal.svg
@@ -0,0 +1,13 @@
+
+
\ No newline at end of file
diff --git a/tests/assets/images/micro_off_pressed.svg b/tests/assets/images/micro_off_pressed.svg
new file mode 100644
index 000000000..bdf99ea2d
--- /dev/null
+++ b/tests/assets/images/micro_off_pressed.svg
@@ -0,0 +1,13 @@
+
+
\ No newline at end of file
diff --git a/tests/assets/images/speaker_off_hovered.svg b/tests/assets/images/speaker_off_hovered.svg
new file mode 100644
index 000000000..0256a84ba
--- /dev/null
+++ b/tests/assets/images/speaker_off_hovered.svg
@@ -0,0 +1,13 @@
+
+
\ No newline at end of file
diff --git a/tests/assets/images/speaker_off_normal.svg b/tests/assets/images/speaker_off_normal.svg
new file mode 100644
index 000000000..ce2698b7e
--- /dev/null
+++ b/tests/assets/images/speaker_off_normal.svg
@@ -0,0 +1,14 @@
+
+
\ No newline at end of file
diff --git a/tests/assets/images/speaker_off_pressed.svg b/tests/assets/images/speaker_off_pressed.svg
new file mode 100644
index 000000000..bde08e696
--- /dev/null
+++ b/tests/assets/images/speaker_off_pressed.svg
@@ -0,0 +1,13 @@
+
+
\ No newline at end of file
diff --git a/tests/resources.qrc b/tests/resources.qrc
index 0d455f7b9..3c6cc7253 100644
--- a/tests/resources.qrc
+++ b/tests/resources.qrc
@@ -179,7 +179,7 @@
ui/views/App/ManageAccounts.qml
ui/views/App/NewCall.qml
ui/views/App/qmldir
- ui/views/App/Styles/Calls/CallsStyle.qml
+ ui/views/App/Styles/Calls/StartingCallStyle.qml
ui/views/App/Styles/MainWindow/ContactsStyle.qml
ui/views/App/Styles/MainWindow/ConversationStyle.qml
ui/views/App/Styles/MainWindow/MainWindowStyle.qml
diff --git a/tests/ui/views/App/Calls/AbstractCall.qml b/tests/ui/views/App/Calls/AbstractCall.qml
index 8b55a7ce3..a84a6881d 100644
--- a/tests/ui/views/App/Calls/AbstractCall.qml
+++ b/tests/ui/views/App/Calls/AbstractCall.qml
@@ -5,6 +5,8 @@ import Common 1.0
import Linphone 1.0
import LinphoneUtils 1.0
+import App.Styles 1.0
+
// ===================================================================
Rectangle {
@@ -22,12 +24,12 @@ Rectangle {
// -----------------------------------------------------------------
- color: '#E8E8E8'
+ color: StartingCallStyle.backgroundColor
ColumnLayout {
anchors {
fill: parent
- topMargin: 26
+ topMargin: StartingCallStyle.header.topMargin
}
spacing: 0
@@ -37,18 +39,17 @@ Rectangle {
// ---------------------------------------------------------------
Column {
- spacing: 10
-
Layout.fillWidth: true
+ spacing: StartingCallStyle.header.spacing
Text {
id: callType
- color: '#96A5B1'
+ color: StartingCallStyle.callType.color
font {
bold: true
- pointSize: 17
+ pointSize: StartingCallStyle.callType.fontSize
}
horizontalAlignment: Text.AlignHCenter
@@ -59,6 +60,16 @@ Rectangle {
anchors.horizontalCenter: parent.horizontalCenter
visible: abstractCall.isOutgoing
}
+
+ ContactDescription {
+ id: contactDescription
+
+ username: LinphoneUtils.getContactUsername(_contact)
+ sipAddress: abstractCall.sipAddress
+ height: StartingCallStyle.contactDescriptionHeight
+ horizontalTextAlignment: Text.AlignHCenter
+ width: parent.width
+ }
}
// ---------------------------------------------------------------
@@ -70,46 +81,28 @@ Rectangle {
Layout.fillWidth: true
Layout.fillHeight: true
- Layout.margins: 20
+ Layout.margins: StartingCallStyle.containerMargins
- Item {
- anchors.verticalCenter: parent.verticalCenter
- implicitHeight: contactDescription.height + avatar.height
- width: parent.width
+ Avatar {
+ id: avatar
- ContactDescription {
- id: contactDescription
+ function _computeAvatarSize () {
+ var height = container.height
+ var width = container.width
- username: LinphoneUtils.getContactUsername(_contact)
- sipAddress: abstractCall.sipAddress
- height: 60
- horizontalTextAlignment: Text.AlignHCenter
- width: parent.width
+ var size = height < StartingCallStyle.avatar.maxSize && height > 0
+ ? height
+ : StartingCallStyle.avatar.maxSize
+ return size < width ? size : width
}
- Avatar {
- id: avatar
+ anchors.centerIn: parent
+ backgroundColor: StartingCallStyle.avatar.backgroundColor
+ image: _contact.avatar
+ username: contactDescription.username
- function _computeAvatarSize () {
- var height = container.height - contactDescription.height
- var width = container.width
-
- var size = height < 250 && height > 0 ? height : 250
- return size < width ? size : width
- }
-
- anchors {
- top: contactDescription.bottom
- horizontalCenter: parent.horizontalCenter
- }
-
- backgroundColor: '#A1A1A1'
- image: _contact.avatar
- username: contactDescription.username
-
- height: _computeAvatarSize()
- width: height
- }
+ height: _computeAvatarSize()
+ width: height
}
}
@@ -120,9 +113,8 @@ Rectangle {
Item {
id: actionArea
- Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
- Layout.preferredHeight: 100
+ Layout.preferredHeight: StartingCallStyle.actionAreaHeight
}
}
}
diff --git a/tests/ui/views/App/Calls/OutgoingCall.qml b/tests/ui/views/App/Calls/OutgoingCall.qml
index 0233c07bb..02b8fde6c 100644
--- a/tests/ui/views/App/Calls/OutgoingCall.qml
+++ b/tests/ui/views/App/Calls/OutgoingCall.qml
@@ -5,6 +5,7 @@ import Common 1.0
// ===================================================================
AbstractCall {
+ isOutgoing: true
callTypeLabel: isVideoCall
? 'OUTGOING VIDEO CALL'
: 'OUTGOING AUDIO CALL'
diff --git a/tests/ui/views/App/Styles/Calls/CallsStyle.qml b/tests/ui/views/App/Styles/Calls/CallsStyle.qml
deleted file mode 100644
index 568b384f3..000000000
--- a/tests/ui/views/App/Styles/Calls/CallsStyle.qml
+++ /dev/null
@@ -1,11 +0,0 @@
-pragma Singleton
-import QtQuick 2.7
-
-import Common 1.0
-
-// ===================================================================
-
-QtObject {
-
-
-}
diff --git a/tests/ui/views/App/Styles/Calls/StartingCallStyle.qml b/tests/ui/views/App/Styles/Calls/StartingCallStyle.qml
new file mode 100644
index 000000000..5f235652a
--- /dev/null
+++ b/tests/ui/views/App/Styles/Calls/StartingCallStyle.qml
@@ -0,0 +1,28 @@
+pragma Singleton
+import QtQuick 2.7
+
+import Common 1.0
+
+// ===================================================================
+
+QtObject {
+ property color backgroundColor: '#E8E8E8'
+ property int actionAreaHeight: 100
+ property int contactDescriptionHeight: 60
+ property int containerMargins: 20
+
+ property QtObject header: QtObject {
+ property int spacing: 10
+ property int topMargin: 26
+ }
+
+ property QtObject avatar: QtObject {
+ property color backgroundColor: '#A1A1A1'
+ property int maxSize: 300
+ }
+
+ property QtObject callType: QtObject {
+ property color color: '#96A5B1'
+ property int fontSize: 17
+ }
+}
diff --git a/tests/ui/views/App/Styles/qmldir b/tests/ui/views/App/Styles/qmldir
index 3462d7a04..8e08ee53a 100644
--- a/tests/ui/views/App/Styles/qmldir
+++ b/tests/ui/views/App/Styles/qmldir
@@ -4,7 +4,7 @@ module App.Styles
# Views styles -------------------------------------------------------
-singleton CallsStyle 1.0 Calls/CallsStyle.qml
+singleton StartingCallStyle 1.0 Calls/StartingCallStyle.qml
singleton ContactsStyle 1.0 MainWindow/ContactsStyle.qml
singleton ConversationStyle 1.0 MainWindow/ConversationStyle.qml