Show controls in the middle of wide video.

This commit is contained in:
John Preston 2021-05-11 14:24:11 +04:00
parent 20ff79abf4
commit 5f4903a279
2 changed files with 11 additions and 2 deletions

View File

@ -1138,7 +1138,7 @@ groupCallNarrowUserpicTop: 13px;
groupCallNarrowNameTop: 65px;
groupCallNarrowIconTop: 62px;
groupCallNarrowIconLess: 5px;
groupCallWideModeWidthMin: 520px;
groupCallWideModeWidthMin: 550px;
groupCallWideModeSize: size(720px, 480px);
groupCallNarrowAddMemberHeight: 32px;
groupCallNarrowOutline: 2px;

View File

@ -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) {