mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Improve mute button styles.
This commit is contained in:
parent
f1b6d1fdae
commit
8af40c22a4
3 changed files with 30 additions and 17 deletions
|
@ -50,7 +50,7 @@ CallBodyLayout {
|
||||||
callBodyLayout: CallBodyLayout {
|
callBodyLayout: CallBodyLayout {
|
||||||
height: 284px;
|
height: 284px;
|
||||||
photoTop: 21px;
|
photoTop: 21px;
|
||||||
photoSize: 180px;
|
photoSize: 160px;
|
||||||
nameTop: 221px;
|
nameTop: 221px;
|
||||||
statusTop: 254px;
|
statusTop: 254px;
|
||||||
}
|
}
|
||||||
|
@ -114,28 +114,36 @@ callHangup: CallButton {
|
||||||
}
|
}
|
||||||
callCancel: CallButton {
|
callCancel: CallButton {
|
||||||
button: IconButton(callButton) {
|
button: IconButton(callButton) {
|
||||||
icon: icon {{ "box_button_close", callCancelFg }};
|
icon: icon {{ "box_button_close", callIconFgActive }};
|
||||||
ripple: RippleAnimation(defaultRippleAnimation) {
|
ripple: RippleAnimation(defaultRippleAnimation) {
|
||||||
color: callCancelRipple;
|
color: callIconActiveRipple;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bg: callCancelBg;
|
bg: callIconBgActive;
|
||||||
outerBg: callCancelBg;
|
outerBg: callIconBgActive;
|
||||||
label: callButtonLabel;
|
label: callButtonLabel;
|
||||||
}
|
}
|
||||||
callMuteToggle: CallButton {
|
callMicrophoneMute: CallButton {
|
||||||
button: IconButton(callButton) {
|
button: IconButton(callButton) {
|
||||||
icon: icon {{ "call_record_active", callIconFg }};
|
icon: icon {{ "call_record_active", callIconFg }};
|
||||||
ripple: RippleAnimation(defaultRippleAnimation) {
|
ripple: RippleAnimation(defaultRippleAnimation) {
|
||||||
color: callMuteRipple;
|
color: callMuteRipple;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bg: callMuteRipple;
|
bg: callIconBg;
|
||||||
outerBg: callMuteRipple;
|
outerBg: callMuteRipple;
|
||||||
label: callButtonLabel;
|
label: callButtonLabel;
|
||||||
}
|
}
|
||||||
callUnmuteIcon: icon {{ "call_record_muted", callIconFg }};
|
callMicrophoneUnmute: CallButton(callMicrophoneMute) {
|
||||||
callCameraToggle: CallButton(callMuteToggle) {
|
button: IconButton(callButton) {
|
||||||
|
icon: icon {{ "call_record_muted", callIconFgActive }};
|
||||||
|
ripple: RippleAnimation(defaultRippleAnimation) {
|
||||||
|
color: callIconActiveRipple;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bg: callIconBgActive;
|
||||||
|
}
|
||||||
|
callCameraMute: CallButton(callMicrophoneMute) {
|
||||||
button: IconButton(callButton) {
|
button: IconButton(callButton) {
|
||||||
icon: icon {{ "call_camera_active", callIconFg }};
|
icon: icon {{ "call_camera_active", callIconFg }};
|
||||||
ripple: RippleAnimation(defaultRippleAnimation) {
|
ripple: RippleAnimation(defaultRippleAnimation) {
|
||||||
|
@ -143,7 +151,14 @@ callCameraToggle: CallButton(callMuteToggle) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
callNoCameraIcon: icon {{ "call_camera_muted", callIconFg }};
|
callCameraUnmute: CallButton(callMicrophoneUnmute) {
|
||||||
|
button: IconButton(callButton) {
|
||||||
|
icon: icon {{ "call_camera_muted", callIconFgActive }};
|
||||||
|
ripple: RippleAnimation(defaultRippleAnimation) {
|
||||||
|
color: callIconActiveRipple;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
callName: FlatLabel(defaultFlatLabel) {
|
callName: FlatLabel(defaultFlatLabel) {
|
||||||
minWidth: 260px;
|
minWidth: 260px;
|
||||||
|
|
|
@ -276,8 +276,8 @@ Panel::Panel(not_null<Call*> call)
|
||||||
, _answerHangupRedial(widget(), st::callAnswer, &st::callHangup)
|
, _answerHangupRedial(widget(), st::callAnswer, &st::callHangup)
|
||||||
, _decline(widget(), object_ptr<Button>(widget(), st::callHangup))
|
, _decline(widget(), object_ptr<Button>(widget(), st::callHangup))
|
||||||
, _cancel(widget(), object_ptr<Button>(widget(), st::callCancel))
|
, _cancel(widget(), object_ptr<Button>(widget(), st::callCancel))
|
||||||
, _camera(widget(), st::callCameraToggle)
|
, _camera(widget(), st::callCameraMute, &st::callCameraUnmute)
|
||||||
, _mute(widget(), st::callMuteToggle)
|
, _mute(widget(), st::callMicrophoneMute, &st::callMicrophoneUnmute)
|
||||||
, _name(widget(), st::callName)
|
, _name(widget(), st::callName)
|
||||||
, _status(widget(), st::callStatus) {
|
, _status(widget(), st::callStatus) {
|
||||||
_decline->setDuration(st::callPanelDuration);
|
_decline->setDuration(st::callPanelDuration);
|
||||||
|
@ -483,14 +483,12 @@ void Panel::reinitWithCall(Call *call) {
|
||||||
|
|
||||||
_call->mutedValue(
|
_call->mutedValue(
|
||||||
) | rpl::start_with_next([=](bool mute) {
|
) | rpl::start_with_next([=](bool mute) {
|
||||||
_mute->setIconOverride(mute ? &st::callUnmuteIcon : nullptr);
|
_mute->setProgress(mute ? 1. : 0.);
|
||||||
}, _callLifetime);
|
}, _callLifetime);
|
||||||
|
|
||||||
_call->videoOutgoing()->stateValue(
|
_call->videoOutgoing()->stateValue(
|
||||||
) | rpl::start_with_next([=](Webrtc::VideoState state) {
|
) | rpl::start_with_next([=](Webrtc::VideoState state) {
|
||||||
_camera->setIconOverride((state == Webrtc::VideoState::Active)
|
_camera->setProgress((state == Webrtc::VideoState::Active) ? 0. : 1.);
|
||||||
? nullptr
|
|
||||||
: &st::callNoCameraIcon);
|
|
||||||
}, _callLifetime);
|
}, _callLifetime);
|
||||||
|
|
||||||
_call->stateValue(
|
_call->stateValue(
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 921686055c2b8b3a47a7f81840339a5a716b4edd
|
Subproject commit 50aa8497c290f23c496b62882921a6143e9d8321
|
Loading…
Add table
Reference in a new issue