mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Improve mute button styles.
This commit is contained in:
@@ -50,7 +50,7 @@ CallBodyLayout {
|
||||
callBodyLayout: CallBodyLayout {
|
||||
height: 284px;
|
||||
photoTop: 21px;
|
||||
photoSize: 180px;
|
||||
photoSize: 160px;
|
||||
nameTop: 221px;
|
||||
statusTop: 254px;
|
||||
}
|
||||
@@ -114,28 +114,36 @@ callHangup: CallButton {
|
||||
}
|
||||
callCancel: CallButton {
|
||||
button: IconButton(callButton) {
|
||||
icon: icon {{ "box_button_close", callCancelFg }};
|
||||
icon: icon {{ "box_button_close", callIconFgActive }};
|
||||
ripple: RippleAnimation(defaultRippleAnimation) {
|
||||
color: callCancelRipple;
|
||||
color: callIconActiveRipple;
|
||||
}
|
||||
}
|
||||
bg: callCancelBg;
|
||||
outerBg: callCancelBg;
|
||||
bg: callIconBgActive;
|
||||
outerBg: callIconBgActive;
|
||||
label: callButtonLabel;
|
||||
}
|
||||
callMuteToggle: CallButton {
|
||||
callMicrophoneMute: CallButton {
|
||||
button: IconButton(callButton) {
|
||||
icon: icon {{ "call_record_active", callIconFg }};
|
||||
ripple: RippleAnimation(defaultRippleAnimation) {
|
||||
color: callMuteRipple;
|
||||
}
|
||||
}
|
||||
bg: callMuteRipple;
|
||||
bg: callIconBg;
|
||||
outerBg: callMuteRipple;
|
||||
label: callButtonLabel;
|
||||
}
|
||||
callUnmuteIcon: icon {{ "call_record_muted", callIconFg }};
|
||||
callCameraToggle: CallButton(callMuteToggle) {
|
||||
callMicrophoneUnmute: CallButton(callMicrophoneMute) {
|
||||
button: IconButton(callButton) {
|
||||
icon: icon {{ "call_record_muted", callIconFgActive }};
|
||||
ripple: RippleAnimation(defaultRippleAnimation) {
|
||||
color: callIconActiveRipple;
|
||||
}
|
||||
}
|
||||
bg: callIconBgActive;
|
||||
}
|
||||
callCameraMute: CallButton(callMicrophoneMute) {
|
||||
button: IconButton(callButton) {
|
||||
icon: icon {{ "call_camera_active", callIconFg }};
|
||||
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) {
|
||||
minWidth: 260px;
|
||||
|
@@ -276,8 +276,8 @@ Panel::Panel(not_null<Call*> call)
|
||||
, _answerHangupRedial(widget(), st::callAnswer, &st::callHangup)
|
||||
, _decline(widget(), object_ptr<Button>(widget(), st::callHangup))
|
||||
, _cancel(widget(), object_ptr<Button>(widget(), st::callCancel))
|
||||
, _camera(widget(), st::callCameraToggle)
|
||||
, _mute(widget(), st::callMuteToggle)
|
||||
, _camera(widget(), st::callCameraMute, &st::callCameraUnmute)
|
||||
, _mute(widget(), st::callMicrophoneMute, &st::callMicrophoneUnmute)
|
||||
, _name(widget(), st::callName)
|
||||
, _status(widget(), st::callStatus) {
|
||||
_decline->setDuration(st::callPanelDuration);
|
||||
@@ -483,14 +483,12 @@ void Panel::reinitWithCall(Call *call) {
|
||||
|
||||
_call->mutedValue(
|
||||
) | rpl::start_with_next([=](bool mute) {
|
||||
_mute->setIconOverride(mute ? &st::callUnmuteIcon : nullptr);
|
||||
_mute->setProgress(mute ? 1. : 0.);
|
||||
}, _callLifetime);
|
||||
|
||||
_call->videoOutgoing()->stateValue(
|
||||
) | rpl::start_with_next([=](Webrtc::VideoState state) {
|
||||
_camera->setIconOverride((state == Webrtc::VideoState::Active)
|
||||
? nullptr
|
||||
: &st::callNoCameraIcon);
|
||||
_camera->setProgress((state == Webrtc::VideoState::Active) ? 0. : 1.);
|
||||
}, _callLifetime);
|
||||
|
||||
_call->stateValue(
|
||||
|
Submodule Telegram/lib_ui updated: 921686055c...50aa8497c2
Reference in New Issue
Block a user