Commit 4bcb9e88 authored by Ronan's avatar Ronan

feat(app): disable camera icons when video is not enabled at compile time

parent 52d5dc58
<?xml version="1.0" encoding="UTF-8"?>
<svg width="40px" height="40px" viewBox="0 0 40 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 40.3 (33839) - http://www.bohemiancoding.com/sketch -->
<title>video_call_default</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="video_call_default">
<path d="M20,40 C31.045695,40 40,31.045695 40,20 C40,8.954305 31.045695,0 20,0 C8.954305,0 0,8.954305 0,20 C0,31.045695 8.954305,40 20,40 Z" fill="#D0D8DE"></path>
<g id="videocall_icon" transform="translate(9.000000, 13.000000)" stroke-linecap="round" stroke-width="1.5" stroke="#FFFFFF" stroke-linejoin="round">
<polygon points="21.9033897 6.53341215 21.9033897 0.673601511 16.1289093 5.25958769 16.1289093 0.333333333 0.333333333 0.333333333 0.333333333 12.9483398 16.1289093 12.9483398 16.1289093 8.02208543 21.9033897 12.6080716"></polygon>
</g>
</g>
</g>
</svg>
......@@ -193,6 +193,7 @@
<file>assets/images/transfer_normal.svg</file>
<file>assets/images/transfer_pressed.svg</file>
<file>assets/images/update_sign.svg</file>
<file>assets/images/video_call_accept_disabled.svg</file>
<file>assets/images/video_call_accept_hovered.svg</file>
<file>assets/images/video_call_accept_normal.svg</file>
<file>assets/images/video_call_accept_pressed.svg</file>
......
......@@ -53,14 +53,13 @@ Notification {
iconSize: NotificationReceivedCallStyle.actionArea.iconSize
ActionButton {
enabled: SettingsModel.videoSupported
icon: 'video_call_accept'
onClicked: notification._close(notification.call.acceptWithVideo)
}
ActionButton {
icon: 'call_accept'
onClicked: notification._close(notification.call.accept)
}
}
......
......@@ -38,6 +38,7 @@ SearchBox {
id: view
actions: [{
enabled: SettingsModel.videoSupported,
icon: 'video_call',
handler: function (entry) {
searchBox.closeMenu()
......
......@@ -97,6 +97,10 @@ ScrollableListView {
model: sipAddressesView.actions
ActionButton {
enabled: {
var status = sipAddressesView.actions[index].enabled
return status === undefined || status
}
icon: modelData.icon
onClicked: sipAddressesView.actions[index].handler({
sipAddress: sipAddressesView.interpretableSipAddress
......@@ -229,6 +233,10 @@ ScrollableListView {
model: sipAddressesView.actions
ActionButton {
enabled: {
var status = sipAddressesView.actions[index].enabled
return status === undefined || status
}
icon: modelData.icon
onClicked: sipAddressesView.actions[index].handler($sipAddress)
}
......
......@@ -59,6 +59,7 @@ DialogPlus {
anchors.fill: parent
actions: [{
enabled: SettingsModel.videoSupported,
icon: 'video_call',
handler: function (entry) {
CallsListModel.launchVideoCall(entry.sipAddress)
......
......@@ -336,17 +336,20 @@ Rectangle {
}
}
ActionSwitch {
enabled: incall.call.videoEnabled
icon: 'camera'
iconSize: CallStyle.actionArea.iconSize
updating: incall.call.updating
Loader {
active: SettingsModel.videoSupported
sourceComponent: ActionSwitch {
enabled: incall.call.videoEnabled
icon: 'camera'
iconSize: CallStyle.actionArea.iconSize
updating: incall.call.updating
onClicked: incall.call.videoEnabled = !enabled
onClicked: incall.call.videoEnabled = !enabled
TooltipArea {
text: qsTr('pendingRequestLabel')
visible: parent.updating
TooltipArea {
text: qsTr('pendingRequestLabel')
visible: parent.updating
}
}
}
......
import Common 1.0
import Linphone 1.0
import App.Styles 1.0
......@@ -10,8 +11,8 @@ AbstractStartingCall {
iconSize: CallStyle.actionArea.iconSize
ActionButton {
enabled: SettingsModel.videoSupported
icon: 'video_call_accept'
onClicked: call.acceptWithVideo()
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment