From a7a5c96d376b4ee7a4a4bfd209729729c36927c0 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Fri, 2 Dec 2016 11:17:14 +0100 Subject: [PATCH] feat(app): calls views in progress --- tests/assets/images/led_green.svg | 4 ++-- tests/assets/images/led_orange.svg | 4 ++-- tests/assets/images/led_red.svg | 4 ++-- tests/assets/images/led_white.svg | 4 ++-- tests/resources.qrc | 6 +++++ tests/ui/modules/Common/Form/ActionButton.qml | 4 ++-- tests/ui/modules/Common/Form/ActionSwitch.qml | 22 +++++++++---------- tests/ui/modules/Linphone/Contact/Avatar.qml | 5 +++-- tests/ui/views/App/Calls/OutgoingCall.qml | 22 ++++++++++++++----- 9 files changed, 47 insertions(+), 28 deletions(-) diff --git a/tests/assets/images/led_green.svg b/tests/assets/images/led_green.svg index 0b52ba0d5..c1687919c 100644 --- a/tests/assets/images/led_green.svg +++ b/tests/assets/images/led_green.svg @@ -12,7 +12,7 @@ - + - \ No newline at end of file + diff --git a/tests/assets/images/led_orange.svg b/tests/assets/images/led_orange.svg index ec43d7553..d82c4f6a1 100644 --- a/tests/assets/images/led_orange.svg +++ b/tests/assets/images/led_orange.svg @@ -12,7 +12,7 @@ - + - \ No newline at end of file + diff --git a/tests/assets/images/led_red.svg b/tests/assets/images/led_red.svg index fe18567ef..bc8597495 100644 --- a/tests/assets/images/led_red.svg +++ b/tests/assets/images/led_red.svg @@ -12,7 +12,7 @@ - + - \ No newline at end of file + diff --git a/tests/assets/images/led_white.svg b/tests/assets/images/led_white.svg index bc3132dd3..b62f1fa1d 100644 --- a/tests/assets/images/led_white.svg +++ b/tests/assets/images/led_white.svg @@ -12,7 +12,7 @@ - + - \ No newline at end of file + diff --git a/tests/resources.qrc b/tests/resources.qrc index df427cd8b..0d455f7b9 100644 --- a/tests/resources.qrc +++ b/tests/resources.qrc @@ -44,6 +44,9 @@ assets/images/led_red.svg assets/images/led_white.svg assets/images/linphone.png + assets/images/micro_off_hovered.svg + assets/images/micro_off_normal.svg + assets/images/micro_off_pressed.svg assets/images/micro_on_hovered.svg assets/images/micro_on_normal.svg assets/images/micro_on_pressed.svg @@ -51,6 +54,9 @@ assets/images/missed_outgoing_call.svg assets/images/outgoing_call.svg assets/images/search.svg + assets/images/speaker_off_hovered.svg + assets/images/speaker_off_normal.svg + assets/images/speaker_off_pressed.svg assets/images/speaker_on_hovered.svg assets/images/speaker_on_normal.svg assets/images/speaker_on_pressed.svg diff --git a/tests/ui/modules/Common/Form/ActionButton.qml b/tests/ui/modules/Common/Form/ActionButton.qml index d75b4154b..3a17b3368 100644 --- a/tests/ui/modules/Common/Form/ActionButton.qml +++ b/tests/ui/modules/Common/Form/ActionButton.qml @@ -17,7 +17,7 @@ Button { // `icon`_pressed, `icon`_hovered and `icon`_normal. property string icon - // ----------------------------------------------------------------- + // ----------------------------------------------------------------- function _getIcon () { if (!useStates) { @@ -31,7 +31,7 @@ Button { ) } - // ----------------------------------------------------------------- + // ----------------------------------------------------------------- background: Rectangle { color: 'transparent' diff --git a/tests/ui/modules/Common/Form/ActionSwitch.qml b/tests/ui/modules/Common/Form/ActionSwitch.qml index acb5d7e50..6dc313acb 100644 --- a/tests/ui/modules/Common/Form/ActionSwitch.qml +++ b/tests/ui/modules/Common/Form/ActionSwitch.qml @@ -3,25 +3,25 @@ import QtQuick 2.7 // =================================================================== Item { - property alias useStates: actionButton.useStates + property alias useStates: actionButton.useStates property int iconSize // Optionnal. property string icon - property bool enabled: true + property bool enabled: true - signal onClicked + signal clicked - // ----------------------------------------------------------------- + // ----------------------------------------------------------------- - height: iconSize || parent.iconSize || parent.height + height: iconSize || parent.iconSize || parent.height width: iconSize || parent.iconSize || parent.height - ActionButton { - id: actionButton + ActionButton { + id: actionButton - anchors.fill: parent - icon: parent.icon + (parent.enabled ? '_on' : '_off') + anchors.fill: parent + icon: parent.icon + (parent.enabled ? '_on' : '_off') - onClicked: parent.onClicked - } + onClicked: parent.clicked() + } } diff --git a/tests/ui/modules/Linphone/Contact/Avatar.qml b/tests/ui/modules/Linphone/Contact/Avatar.qml index f5dbd3f37..edc42701c 100644 --- a/tests/ui/modules/Linphone/Contact/Avatar.qml +++ b/tests/ui/modules/Linphone/Contact/Avatar.qml @@ -58,6 +58,7 @@ Item { } text: _computeInitials() + visible: roundedImage.status !== Image.Ready } PresenceLevel { @@ -68,7 +69,7 @@ Item { right: parent.right } - height: parent.height / 3 - width: parent.width / 3 + height: parent.height / 4 + width: parent.width / 4 } } diff --git a/tests/ui/views/App/Calls/OutgoingCall.qml b/tests/ui/views/App/Calls/OutgoingCall.qml index 3a3f1d318..0233c07bb 100644 --- a/tests/ui/views/App/Calls/OutgoingCall.qml +++ b/tests/ui/views/App/Calls/OutgoingCall.qml @@ -1,3 +1,5 @@ +import QtQuick 2.7 + import Common 1.0 // =================================================================== @@ -9,21 +11,31 @@ AbstractCall { ActionBar { anchors { - left: parent.left - leftMargin: 50 - verticalCenter: parent.verticalCenter - } - iconSize: 40 + left: parent.left + leftMargin: 50 + verticalCenter: parent.verticalCenter + } + iconSize: 40 ActionSwitch { icon: 'micro' + onClicked: enabled = !enabled } ActionSwitch { icon: 'speaker' + onClicked: enabled = !enabled } } + Rectangle { + anchors.centerIn: parent + color: 'red' + width: 130 + height: 80 + visible: isVideoCall + } + ActionBar { anchors { verticalCenter: parent.verticalCenter