From c821636a33b1362d1517ed72d6756ce3d7ee468f Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Mon, 23 Jan 2017 17:22:56 +0100 Subject: [PATCH] feat(ui/views/App/Calls/Incall): little fixes --- .../views/App/Calls/AbstractStartingCall.qml | 4 +-- tests/ui/views/App/Calls/Incall.qml | 32 +++++++++++-------- tests/ui/views/App/Styles/Calls/CallStyle.qml | 6 +++- 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/tests/ui/views/App/Calls/AbstractStartingCall.qml b/tests/ui/views/App/Calls/AbstractStartingCall.qml index ad76f2877..6656e61e1 100644 --- a/tests/ui/views/App/Calls/AbstractStartingCall.qml +++ b/tests/ui/views/App/Calls/AbstractStartingCall.qml @@ -38,7 +38,7 @@ Rectangle { ContactDescription { id: contactDescription - height: CallStyle.header.contactDescriptionHeight + height: CallStyle.header.contactDescription.height horizontalTextAlignment: Text.AlignHCenter sipAddress: call.sipAddress username: LinphoneUtils.getContactUsername(_contactObserver.contact || call.sipAddress) @@ -81,7 +81,7 @@ Rectangle { anchors.centerIn: parent backgroundColor: CallStyle.container.avatar.backgroundColor - image: _contactObserver.contact && _contactObserver.contact.avatar + image: _contactObserver.contact && _contactObserver.contact.vcard.avatar username: contactDescription.username height: _computeAvatarSize() diff --git a/tests/ui/views/App/Calls/Incall.qml b/tests/ui/views/App/Calls/Incall.qml index 34c3ca959..f8d2af9a6 100644 --- a/tests/ui/views/App/Calls/Incall.qml +++ b/tests/ui/views/App/Calls/Incall.qml @@ -41,7 +41,7 @@ Rectangle { Layout.fillWidth: true Layout.leftMargin: CallStyle.header.leftMargin Layout.rightMargin: CallStyle.header.rightMargin - Layout.preferredHeight: CallStyle.header.contactDescriptionHeight + Layout.preferredHeight: CallStyle.header.contactDescription.height Icon { id: callQuality @@ -49,7 +49,7 @@ Rectangle { anchors.left: parent.left icon: 'call_quality_0' iconSize: CallStyle.header.iconSize - onIconChanged: console.log(icon) + // See: http://www.linphone.org/docs/liblinphone/group__call__misc.html#ga62c7d3d08531b0cc634b797e273a0a73 Timer { interval: 5000 @@ -77,25 +77,29 @@ Rectangle { username: LinphoneUtils.getContactUsername(_contactObserver.contact || call.sipAddress) height: parent.height - width: parent.width - cameraActions.width - callQuality.width - 150 + width: parent.width - cameraActions.width - callQuality.width - CallStyle.header.contactDescription.width } - ActionBar { + Loader { id: cameraActions anchors.right: parent.right - iconSize: CallStyle.header.iconSize + active: call.videoInputEnabled - ActionButton { - icon: 'screenshot' - } + sourceComponent: ActionBar { + iconSize: CallStyle.header.iconSize - ActionButton { - icon: 'record' - } + ActionButton { + icon: 'screenshot' + } - ActionButton { - icon: 'fullscreen' + ActionButton { + icon: 'record' + } + + ActionButton { + icon: 'fullscreen' + } } } } @@ -127,7 +131,7 @@ Rectangle { } backgroundColor: CallStyle.container.avatar.backgroundColor - image: _contactObserver.contact ? _contactObserver.contact.vcard.avatar : '' + image: _contactObserver.contact && _contactObserver.contact.vcard.avatar username: contactDescription.username height: _computeAvatarSize() diff --git a/tests/ui/views/App/Styles/Calls/CallStyle.qml b/tests/ui/views/App/Styles/Calls/CallStyle.qml index 1c2e3069f..aeaca94e4 100644 --- a/tests/ui/views/App/Styles/Calls/CallStyle.qml +++ b/tests/ui/views/App/Styles/Calls/CallStyle.qml @@ -31,7 +31,6 @@ QtObject { } property QtObject header: QtObject { - property int contactDescriptionHeight: 60 property int iconSize: 40 property int leftMargin: 20 property int rightMargin: 20 @@ -43,5 +42,10 @@ QtObject { property int height: 30 property int width: 30 } + + property QtObject contactDescription: QtObject { + property int height: 60 + property int width: 150 + } } }