feat(app): disable some video buttons when video is not enabled at compile time

This commit is contained in:
Ronan Abhamon 2018-04-16 11:19:07 +02:00
parent d2999acacd
commit 090b0e55f3
4 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,15 @@
<?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>

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -196,6 +196,7 @@
<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>
<file>assets/images/video_call_disabled.svg</file>
<file>assets/images/video_call_hovered.svg</file>
<file>assets/images/video_call_normal.svg</file>
<file>assets/images/video_call_pressed.svg</file>

View file

@ -131,6 +131,7 @@ ColumnLayout {
iconSize: ContactsStyle.contact.actionButtonsSize
ActionButton {
enabled: SettingsModel.videoSupported
icon: 'video_call'
onClicked: actions.itemAt(0).open()
}

View file

@ -74,6 +74,7 @@ ColumnLayout {
iconSize: ConversationStyle.bar.actions.call.iconSize
ActionButton {
enabled: SettingsModel.videoSupported
icon: 'video_call'
onClicked: CallsListModel.launchVideoCall(conversation.sipAddress)
}