mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-03 21:54:05 +02:00
Fix cal buttons positioning.
This commit is contained in:
parent
d052eac019
commit
c846eeed9d
1 changed files with 5 additions and 1 deletions
|
@ -1233,8 +1233,11 @@ void Panel::updateOutgoingVideoBubbleGeometry() {
|
|||
}
|
||||
|
||||
void Panel::updateHangupGeometry() {
|
||||
const auto isBusy = (_call
|
||||
&& _call->state() == State::Busy);
|
||||
const auto isWaitingUser = (_call
|
||||
&& _call->state() == State::WaitingUserConfirmation);
|
||||
const auto incomingWaiting = _call && _call->isIncomingWaiting();
|
||||
const auto hangupProgress = isWaitingUser
|
||||
? 0.
|
||||
: _hangupShownProgress.value(_hangupShown ? 1. : 0.);
|
||||
|
@ -1243,7 +1246,8 @@ void Panel::updateHangupGeometry() {
|
|||
// Screencast - Camera - Cancel/Decline - Answer/Hangup/Redial - Mute.
|
||||
const auto buttonWidth = st::callCancel.button.width;
|
||||
const auto cancelWidth = buttonWidth * (1. - hangupProgress);
|
||||
const auto cancelLeft = (widget()->width() - buttonWidth) / 2;
|
||||
const auto cancelLeft = (widget()->width() - buttonWidth) / 2
|
||||
- ((isBusy || incomingWaiting) ? buttonWidth : 0);
|
||||
|
||||
_cancel->moveToLeft(cancelLeft, _buttonsTop);
|
||||
_decline->moveToLeft(cancelLeft, _buttonsTop);
|
||||
|
|
Loading…
Add table
Reference in a new issue