Commit 54d76970 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk Committed by Andreas Traczyk

UI/UX: update call buttons

Change-Id: I35b65414e5af2e526bbb62832fc0c75a8d340d6a
Reviewed-by: Andreas Traczyk's avatarAndreas Traczyk <andreas.traczyk@savoirfairelinux.com>
parent 0bc4c595
......@@ -284,6 +284,7 @@ SET(myApp_ICON ${CMAKE_CURRENT_SOURCE_DIR}/data/appicon.icns)
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
......
......@@ -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);
}
......
......@@ -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>
......
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