UI/UX: update call buttons

Change-Id: I35b65414e5af2e526bbb62832fc0c75a8d340d6a
Reviewed-by: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 68fafa2..5dc9ba4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -284,6 +284,7 @@
 SET_SOURCE_FILES_PROPERTIES(${myApp_ICON} PROPERTIES
        MACOSX_PACKAGE_LOCATION Resources)
 SET(ring_ICONS
+${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_audio.png
 ${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_folder.png
 ${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_block.png
 ${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_attachment.png
diff --git a/data/dark/ic_action_audio.png b/data/dark/ic_action_audio.png
new file mode 100755
index 0000000..36b3013
--- /dev/null
+++ b/data/dark/ic_action_audio.png
Binary files differ
diff --git a/src/CurrentCallVC.mm b/src/CurrentCallVC.mm
index dea1d5b..3164e69 100644
--- a/src/CurrentCallVC.mm
+++ b/src/CurrentCallVC.mm
@@ -156,6 +156,10 @@
     convUid_ = convUid;
     accountInfo_ = account;
     [self.chatVC setConversationUid:convUid model:account->conversationModel.get()];
+    auto currentCall = callModel->getCall(callUid_);
+    if(currentCall.isAudioOnly) {
+        muteVideoButton.image = [NSImage imageNamed:@"ic_action_mute_video.png"];
+    }
 }
 
 - (void)awakeFromNib
@@ -720,6 +724,7 @@
     auto* callModel = accountInfo_->callModel.get();
 
     callModel->toggleAudioRecord(callUid_);
+    [recordOnOffButton setPressed:!recordOnOffButton.isPressed];
 }
 
 - (IBAction)toggleHold:(id)sender {
@@ -727,6 +732,12 @@
         return;
 
     auto* callModel = accountInfo_->callModel.get();
+    auto currentCall = callModel->getCall(callUid_);
+    if (currentCall.status != lrc::api::call::Status::PAUSED) {
+        holdOnOffButton.image = [NSImage imageNamed:@"ic_action_holdoff.png"];
+    } else {
+        holdOnOffButton.image = [NSImage imageNamed:@"ic_action_hold.png"];
+    }
 
     callModel->togglePause(callUid_);
 }
@@ -758,7 +769,12 @@
         return;
 
     auto* callModel = accountInfo_->callModel.get();
-
+    auto currentCall = callModel->getCall(callUid_);
+    if (currentCall.audioMuted) {
+        muteAudioButton.image = [NSImage imageNamed:@"ic_action_audio.png"];
+    } else {
+       muteAudioButton.image = [NSImage imageNamed:@"ic_action_mute_audio.png"];
+    }
     callModel->toggleMedia(callUid_, lrc::api::NewCallModel::Media::AUDIO);
 }
 
@@ -766,9 +782,15 @@
 {
     if (accountInfo_ == nil)
         return;
-
     auto* callModel = accountInfo_->callModel.get();
-
+    auto currentCall = callModel->getCall(callUid_);
+    if(!currentCall.isAudioOnly) {
+        if (currentCall.videoMuted) {
+            muteVideoButton.image = [NSImage imageNamed:@"ic_action_video.png"];
+        } else {
+            muteVideoButton.image = [NSImage imageNamed:@"ic_action_mute_video.png"];
+        }
+    }
     callModel->toggleMedia(callUid_, lrc::api::NewCallModel::Media::VIDEO);
 }
 
diff --git a/ui/Base.lproj/CurrentCall.xib b/ui/Base.lproj/CurrentCall.xib
index e279f5f..8889543 100644
--- a/ui/Base.lproj/CurrentCall.xib
+++ b/ui/Base.lproj/CurrentCall.xib
@@ -275,7 +275,7 @@
                                                 <constraint firstAttribute="width" constant="40" id="VhT-NE-Ler"/>
                                                 <constraint firstAttribute="height" constant="40" id="WFp-nl-egQ"/>
                                             </constraints>
-                                            <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="ic_action_mute_audio" imagePosition="overlaps" alignment="center" transparent="YES" imageScaling="proportionallyDown" id="7wg-Q4-mbD">
+                                            <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="ic_action_audio" imagePosition="overlaps" alignment="center" transparent="YES" imageScaling="proportionallyDown" id="7wg-Q4-mbD">
                                                 <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                                 <font key="font" metaFont="system"/>
                                             </buttonCell>
@@ -391,7 +391,7 @@
                                                 <constraint firstAttribute="height" constant="40" id="Qiq-Nb-gHN"/>
                                                 <constraint firstAttribute="width" constant="40" id="k3u-dD-eLF"/>
                                             </constraints>
-                                            <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="ic_action_mute_video" imagePosition="overlaps" alignment="center" transparent="YES" imageScaling="proportionallyDown" id="sSe-V6-C7i">
+                                            <buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="ic_action_video" imagePosition="overlaps" alignment="center" transparent="YES" imageScaling="proportionallyDown" id="sSe-V6-C7i">
                                                 <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                                 <font key="font" metaFont="system"/>
                                             </buttonCell>
@@ -1066,15 +1066,15 @@
         <image name="NSUser" width="32" height="32"/>
         <image name="ic_action_accept" width="72" height="72"/>
         <image name="ic_action_add_participant" width="72" height="72"/>
+        <image name="ic_action_audio" width="36" height="36"/>
         <image name="ic_action_cancel" width="72" height="72"/>
         <image name="ic_action_chat" width="72" height="72"/>
         <image name="ic_action_hold" width="72" height="72"/>
         <image name="ic_action_merge_calls" width="72" height="72"/>
-        <image name="ic_action_mute_audio" width="72" height="72"/>
-        <image name="ic_action_mute_video" width="72" height="72"/>
         <image name="ic_action_quality" width="72" height="72"/>
         <image name="ic_action_record" width="54" height="54"/>
         <image name="ic_action_transfer" width="57.599998474121094" height="57.599998474121094"/>
+        <image name="ic_action_video" width="72" height="72"/>
         <image name="ic_dialpad" width="72" height="72"/>
         <image name="ic_more" width="72" height="72"/>
     </resources>