diff --git a/tests/assets/images/micro_on_hovered.svg b/tests/assets/images/micro_on_hovered.svg
new file mode 100644
index 000000000..0b6144c27
--- /dev/null
+++ b/tests/assets/images/micro_on_hovered.svg
@@ -0,0 +1,13 @@
+
+
\ No newline at end of file
diff --git a/tests/assets/images/micro_on_normal.svg b/tests/assets/images/micro_on_normal.svg
new file mode 100644
index 000000000..da770932a
--- /dev/null
+++ b/tests/assets/images/micro_on_normal.svg
@@ -0,0 +1,13 @@
+
+
\ No newline at end of file
diff --git a/tests/assets/images/micro_on_pressed.svg b/tests/assets/images/micro_on_pressed.svg
new file mode 100644
index 000000000..c37e9795a
--- /dev/null
+++ b/tests/assets/images/micro_on_pressed.svg
@@ -0,0 +1,13 @@
+
+
\ No newline at end of file
diff --git a/tests/assets/images/speaker_on_hovered.svg b/tests/assets/images/speaker_on_hovered.svg
new file mode 100644
index 000000000..ce2698b7e
--- /dev/null
+++ b/tests/assets/images/speaker_on_hovered.svg
@@ -0,0 +1,14 @@
+
+
\ No newline at end of file
diff --git a/tests/assets/images/speaker_on_normal.svg b/tests/assets/images/speaker_on_normal.svg
new file mode 100644
index 000000000..0256a84ba
--- /dev/null
+++ b/tests/assets/images/speaker_on_normal.svg
@@ -0,0 +1,13 @@
+
+
\ No newline at end of file
diff --git a/tests/assets/images/speaker_on_pressed.svg b/tests/assets/images/speaker_on_pressed.svg
new file mode 100644
index 000000000..ffe2b4f41
--- /dev/null
+++ b/tests/assets/images/speaker_on_pressed.svg
@@ -0,0 +1,14 @@
+
+
\ No newline at end of file
diff --git a/tests/resources.qrc b/tests/resources.qrc
index 5d00b3a2e..df427cd8b 100644
--- a/tests/resources.qrc
+++ b/tests/resources.qrc
@@ -44,10 +44,16 @@
assets/images/led_red.svg
assets/images/led_white.svg
assets/images/linphone.png
+ assets/images/micro_on_hovered.svg
+ assets/images/micro_on_normal.svg
+ assets/images/micro_on_pressed.svg
assets/images/missed_incoming_call.svg
assets/images/missed_outgoing_call.svg
assets/images/outgoing_call.svg
assets/images/search.svg
+ assets/images/speaker_on_hovered.svg
+ assets/images/speaker_on_normal.svg
+ assets/images/speaker_on_pressed.svg
assets/images/tooltip_arrow_bottom.svg
assets/images/tooltip_arrow_left.svg
assets/images/tooltip_arrow_right.svg
@@ -71,6 +77,7 @@
ui/modules/Common/Form/AbstractTextButton.qml
ui/modules/Common/Form/ActionBar.qml
ui/modules/Common/Form/ActionButton.qml
+ ui/modules/Common/Form/ActionSwitch.qml
ui/modules/Common/Form/CheckBoxText.qml
ui/modules/Common/Form/ExclusiveButtons.qml
ui/modules/Common/Form/ListForm.qml
diff --git a/tests/ui/modules/Common/Form/ActionButton.qml b/tests/ui/modules/Common/Form/ActionButton.qml
index db6d61327..d75b4154b 100644
--- a/tests/ui/modules/Common/Form/ActionButton.qml
+++ b/tests/ui/modules/Common/Form/ActionButton.qml
@@ -17,6 +17,8 @@ Button {
// `icon`_pressed, `icon`_hovered and `icon`_normal.
property string icon
+ // -----------------------------------------------------------------
+
function _getIcon () {
if (!useStates) {
return button.icon
@@ -29,6 +31,8 @@ Button {
)
}
+ // -----------------------------------------------------------------
+
background: Rectangle {
color: 'transparent'
}
diff --git a/tests/ui/modules/Common/Form/ActionSwitch.qml b/tests/ui/modules/Common/Form/ActionSwitch.qml
new file mode 100644
index 000000000..acb5d7e50
--- /dev/null
+++ b/tests/ui/modules/Common/Form/ActionSwitch.qml
@@ -0,0 +1,27 @@
+import QtQuick 2.7
+
+// ===================================================================
+
+Item {
+ property alias useStates: actionButton.useStates
+ property int iconSize // Optionnal.
+ property string icon
+
+ property bool enabled: true
+
+ signal onClicked
+
+ // -----------------------------------------------------------------
+
+ height: iconSize || parent.iconSize || parent.height
+ width: iconSize || parent.iconSize || parent.height
+
+ ActionButton {
+ id: actionButton
+
+ anchors.fill: parent
+ icon: parent.icon + (parent.enabled ? '_on' : '_off')
+
+ onClicked: parent.onClicked
+ }
+}
diff --git a/tests/ui/modules/Common/qmldir b/tests/ui/modules/Common/qmldir
index 15d89c672..629103738 100644
--- a/tests/ui/modules/Common/qmldir
+++ b/tests/ui/modules/Common/qmldir
@@ -33,6 +33,7 @@ ForceScrollBar 1.0 ForceScrollBar.qml
# Form
ActionBar 1.0 Form/ActionBar.qml
ActionButton 1.0 Form/ActionButton.qml
+ActionSwitch 1.0 Form/ActionSwitch.qml
CheckBoxText 1.0 Form/CheckBoxText.qml
ExclusiveButtons 1.0 Form/ExclusiveButtons.qml
LightButton 1.0 Form/LightButton.qml
diff --git a/tests/ui/views/App/Calls/Calls.qml b/tests/ui/views/App/Calls/Calls.qml
index ae1da4b10..b963e8d6b 100644
--- a/tests/ui/views/App/Calls/Calls.qml
+++ b/tests/ui/views/App/Calls/Calls.qml
@@ -83,7 +83,7 @@ Window {
resizeAInPriority: true
// Call.
- childA: IncomingCall {
+ childA: OutgoingCall {
anchors.fill: parent
sipAddress: 'sip:erwan.croze@sip.linphone.org'
}
diff --git a/tests/ui/views/App/Calls/OutgoingCall.qml b/tests/ui/views/App/Calls/OutgoingCall.qml
index 971462029..3a3f1d318 100644
--- a/tests/ui/views/App/Calls/OutgoingCall.qml
+++ b/tests/ui/views/App/Calls/OutgoingCall.qml
@@ -8,15 +8,19 @@ AbstractCall {
: 'OUTGOING AUDIO CALL'
ActionBar {
- anchors.centerIn: parent
- iconSize: 40
+ anchors {
+ left: parent.left
+ leftMargin: 50
+ verticalCenter: parent.verticalCenter
+ }
+ iconSize: 40
- ActionButton {
- icon: 'video_call_accept'
+ ActionSwitch {
+ icon: 'micro'
}
- ActionButton {
- icon: 'call_accept'
+ ActionSwitch {
+ icon: 'speaker'
}
}