From 5f4903a2797e0c0cec0a7a24a9d003403bb3adb2 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 11 May 2021 14:24:11 +0400 Subject: [PATCH] Show controls in the middle of wide video. --- Telegram/SourceFiles/calls/calls.style | 2 +- .../SourceFiles/calls/group/calls_group_panel.cpp | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/calls/calls.style b/Telegram/SourceFiles/calls/calls.style index 567b2eee8..158b68513 100644 --- a/Telegram/SourceFiles/calls/calls.style +++ b/Telegram/SourceFiles/calls/calls.style @@ -1138,7 +1138,7 @@ groupCallNarrowUserpicTop: 13px; groupCallNarrowNameTop: 65px; groupCallNarrowIconTop: 62px; groupCallNarrowIconLess: 5px; -groupCallWideModeWidthMin: 520px; +groupCallWideModeWidthMin: 550px; groupCallWideModeSize: size(720px, 480px); groupCallNarrowAddMemberHeight: 32px; groupCallNarrowOutline: 2px; diff --git a/Telegram/SourceFiles/calls/group/calls_group_panel.cpp b/Telegram/SourceFiles/calls/group/calls_group_panel.cpp index 7a545d47f..52828ff78 100644 --- a/Telegram/SourceFiles/calls/group/calls_group_panel.cpp +++ b/Telegram/SourceFiles/calls/group/calls_group_panel.cpp @@ -1575,7 +1575,16 @@ void Panel::updateControlsGeometry() { + (_screenShare ? _screenShare->width() + skip : 0) + (_settings ? _settings : _callShare)->width() + skip + _hangup->width() + skip; - auto left = (widget()->width() - fullWidth) / 2; + const auto membersSkip = st::groupCallNarrowSkip; + const auto membersWidth = st::groupCallNarrowSize.width() + + 2 * membersSkip; + auto left = (_mode == PanelMode::Default) + ? (widget()->width() - fullWidth) / 2 + : (membersWidth + + (widget()->width() + - membersWidth + - membersSkip + - fullWidth) / 2); _mute->moveInner({ left + addSkip, buttonsTop + addSkip }); left += muteSize + skip; if (_video) {