diff --git a/assets/images/video_call_accept_disabled.svg b/assets/images/video_call_accept_disabled.svg
deleted file mode 100644
index aa08ecbe6..000000000
--- a/assets/images/video_call_accept_disabled.svg
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
diff --git a/assets/images/video_call_disabled.svg b/assets/images/video_call_disabled.svg
deleted file mode 100644
index aa08ecbe6..000000000
--- a/assets/images/video_call_disabled.svg
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
diff --git a/resources.qrc b/resources.qrc
index 490613444..9e47c852f 100644
--- a/resources.qrc
+++ b/resources.qrc
@@ -193,11 +193,9 @@
assets/images/transfer_normal.svg
assets/images/transfer_pressed.svg
assets/images/update_sign.svg
- assets/images/video_call_accept_disabled.svg
assets/images/video_call_accept_hovered.svg
assets/images/video_call_accept_normal.svg
assets/images/video_call_accept_pressed.svg
- assets/images/video_call_disabled.svg
assets/images/video_call_hovered.svg
assets/images/video_call_normal.svg
assets/images/video_call_pressed.svg
diff --git a/ui/modules/Linphone/Notifications/NotificationReceivedCall.qml b/ui/modules/Linphone/Notifications/NotificationReceivedCall.qml
index c79e1d989..323fda355 100644
--- a/ui/modules/Linphone/Notifications/NotificationReceivedCall.qml
+++ b/ui/modules/Linphone/Notifications/NotificationReceivedCall.qml
@@ -49,13 +49,19 @@ Notification {
Layout.fillWidth: true
ActionBar {
+ id: acceptActionBar
+
anchors.centerIn: parent
iconSize: NotificationReceivedCallStyle.actionArea.iconSize
- ActionButton {
- enabled: SettingsModel.videoSupported
- icon: 'video_call_accept'
- onClicked: notification._close(notification.call.acceptWithVideo)
+ Loader {
+ active: SettingsModel.videoSupported
+ sourceComponent: ActionButton {
+ icon: 'video_call_accept'
+ iconSize: acceptActionBar.iconSize
+
+ onClicked: notification._close(notification.call.acceptWithVideo)
+ }
}
ActionButton {
diff --git a/ui/modules/Linphone/SmartSearchBar/SmartSearchBar.qml b/ui/modules/Linphone/SmartSearchBar/SmartSearchBar.qml
index c808e7ba0..357f09745 100644
--- a/ui/modules/Linphone/SmartSearchBar/SmartSearchBar.qml
+++ b/ui/modules/Linphone/SmartSearchBar/SmartSearchBar.qml
@@ -38,7 +38,7 @@ SearchBox {
id: view
actions: [{
- enabled: SettingsModel.videoSupported,
+ active: SettingsModel.videoSupported,
icon: 'video_call',
handler: function (entry) {
searchBox.closeMenu()
diff --git a/ui/modules/Linphone/View/SipAddressesView.qml b/ui/modules/Linphone/View/SipAddressesView.qml
index 20e541543..e8f2d4a8b 100644
--- a/ui/modules/Linphone/View/SipAddressesView.qml
+++ b/ui/modules/Linphone/View/SipAddressesView.qml
@@ -91,20 +91,26 @@ ScrollableListView {
}
ActionBar {
+ id: defaultContactActionBar
+
iconSize: SipAddressesViewStyle.entry.iconSize
Repeater {
model: sipAddressesView.actions
- ActionButton {
- enabled: {
- var status = sipAddressesView.actions[index].enabled
- return status === undefined || status
+ Loader {
+ active: {
+ var active = sipAddressesView.actions[index].active
+ return active === undefined || active
+ }
+ sourceComponent: ActionButton {
+ icon: modelData.icon
+ iconSize: defaultContactActionBar.iconSize
+
+ onClicked: sipAddressesView.actions[index].handler({
+ sipAddress: sipAddressesView.interpretableSipAddress
+ })
}
- icon: modelData.icon
- onClicked: sipAddressesView.actions[index].handler({
- sipAddress: sipAddressesView.interpretableSipAddress
- })
}
}
}
@@ -227,18 +233,24 @@ ScrollableListView {
// ---------------------------------------------------------------------
ActionBar {
+ id: actionBar
+
iconSize: SipAddressesViewStyle.entry.iconSize
Repeater {
model: sipAddressesView.actions
- ActionButton {
- enabled: {
- var status = sipAddressesView.actions[index].enabled
- return status === undefined || status
+ Loader {
+ active: {
+ var active = sipAddressesView.actions[index].active
+ return active === undefined || active
+ }
+ sourceComponent: ActionButton {
+ icon: modelData.icon
+ iconSize: actionBar.iconSize
+
+ onClicked: sipAddressesView.actions[index].handler($sipAddress)
}
- icon: modelData.icon
- onClicked: sipAddressesView.actions[index].handler($sipAddress)
}
}
}
diff --git a/ui/views/App/Calls/Dialogs/CallSipAddress.qml b/ui/views/App/Calls/Dialogs/CallSipAddress.qml
index d3224fc2b..dcea5ec29 100644
--- a/ui/views/App/Calls/Dialogs/CallSipAddress.qml
+++ b/ui/views/App/Calls/Dialogs/CallSipAddress.qml
@@ -59,7 +59,7 @@ DialogPlus {
anchors.fill: parent
actions: [{
- enabled: SettingsModel.videoSupported,
+ active: SettingsModel.videoSupported,
icon: 'video_call',
handler: function (entry) {
CallsListModel.launchVideoCall(entry.sipAddress)
diff --git a/ui/views/App/Calls/IncomingCall.qml b/ui/views/App/Calls/IncomingCall.qml
index 540f3fd9f..0044e6494 100644
--- a/ui/views/App/Calls/IncomingCall.qml
+++ b/ui/views/App/Calls/IncomingCall.qml
@@ -1,3 +1,5 @@
+import QtQuick 2.7
+
import Common 1.0
import Linphone 1.0
@@ -7,13 +9,19 @@ import App.Styles 1.0
AbstractStartingCall {
ActionBar {
+ id: actionBar
+
anchors.centerIn: parent
iconSize: CallStyle.actionArea.iconSize
- ActionButton {
- enabled: SettingsModel.videoSupported
- icon: 'video_call_accept'
- onClicked: call.acceptWithVideo()
+ Loader {
+ active: SettingsModel.videoSupported
+ sourceComponent: ActionButton {
+ icon: 'video_call_accept'
+ iconSize: actionBar.iconSize
+
+ onClicked: call.acceptWithVideo()
+ }
}
ActionButton {
diff --git a/ui/views/App/Main/Contacts.qml b/ui/views/App/Main/Contacts.qml
index f3435e7a7..333fe92d0 100644
--- a/ui/views/App/Main/Contacts.qml
+++ b/ui/views/App/Main/Contacts.qml
@@ -124,16 +124,22 @@ ColumnLayout {
Item {
ActionBar {
+ id: actionBar
+
anchors {
left: parent.left
verticalCenter: parent.verticalCenter
}
iconSize: ContactsStyle.contact.actionButtonsSize
- ActionButton {
- enabled: SettingsModel.videoSupported
- icon: 'video_call'
- onClicked: actions.itemAt(0).open()
+ Loader {
+ active: SettingsModel.videoSupported
+ sourceComponent: ActionButton {
+ icon: 'video_call'
+ iconSize: actionBar.iconSize
+
+ onClicked: actions.itemAt(0).open()
+ }
}
ActionButton {
diff --git a/ui/views/App/Main/Conversation.qml b/ui/views/App/Main/Conversation.qml
index 233806dd9..69bf4dbc0 100644
--- a/ui/views/App/Main/Conversation.qml
+++ b/ui/views/App/Main/Conversation.qml
@@ -70,13 +70,19 @@ ColumnLayout {
spacing: ConversationStyle.bar.actions.spacing
ActionBar {
+ id: actionBar
+
anchors.verticalCenter: parent.verticalCenter
iconSize: ConversationStyle.bar.actions.call.iconSize
- ActionButton {
- enabled: SettingsModel.videoSupported
- icon: 'video_call'
- onClicked: CallsListModel.launchVideoCall(conversation.sipAddress)
+ Loader {
+ active: SettingsModel.videoSupported
+ sourceComponent: ActionButton {
+ icon: 'video_call'
+ iconSize: actionBar.iconSize
+
+ onClicked: CallsListModel.launchVideoCall(conversation.sipAddress)
+ }
}
ActionButton {