diff --git a/Telegram/Resources/icons/calls/navbar_pin.png b/Telegram/Resources/icons/calls/navbar_pin.png new file mode 100644 index 000000000..a24740603 Binary files /dev/null and b/Telegram/Resources/icons/calls/navbar_pin.png differ diff --git a/Telegram/Resources/icons/calls/navbar_pin@2x.png b/Telegram/Resources/icons/calls/navbar_pin@2x.png new file mode 100644 index 000000000..862df2676 Binary files /dev/null and b/Telegram/Resources/icons/calls/navbar_pin@2x.png differ diff --git a/Telegram/Resources/icons/calls/navbar_pin@3x.png b/Telegram/Resources/icons/calls/navbar_pin@3x.png new file mode 100644 index 000000000..651bf075b Binary files /dev/null and b/Telegram/Resources/icons/calls/navbar_pin@3x.png differ diff --git a/Telegram/SourceFiles/calls/calls.style b/Telegram/SourceFiles/calls/calls.style index 2e5e354f1..ea751a99d 100644 --- a/Telegram/SourceFiles/calls/calls.style +++ b/Telegram/SourceFiles/calls/calls.style @@ -493,6 +493,8 @@ callErrorToast: Toast(defaultToast) { groupCallWidth: 380px; groupCallHeight: 580px; +groupCallWidthRtmp: 720px; +groupCallHeightRtmp: 580px; groupCallHeightRtmpMin: 280px; groupCallRipple: RippleAnimation(defaultRippleAnimation) { @@ -1121,9 +1123,9 @@ groupCallTitle: WindowTitle(defaultWindowTitle) { closeIconActiveOver: groupCallTitleCloseIconOver; } groupCallPinOnTop: IconButton(groupCallTitleButton) { - icon: icon{{ "dialogs/dialogs_pinned", groupCallMemberNotJoinedStatus }}; - iconOver: icon{{ "dialogs/dialogs_pinned", groupCallMembersFg }}; - iconPosition: point(8px, 4px); + icon: icon{{ "calls/navbar_pin", groupCallMemberNotJoinedStatus }}; + iconOver: icon{{ "calls/navbar_pin", groupCallMembersFg }}; + iconPosition: point(0px, 4px); } groupCallMajorBlobIdleRadius: 2px; diff --git a/Telegram/SourceFiles/calls/group/calls_group_panel.cpp b/Telegram/SourceFiles/calls/group/calls_group_panel.cpp index e75d8062b..f6187af81 100644 --- a/Telegram/SourceFiles/calls/group/calls_group_panel.cpp +++ b/Telegram/SourceFiles/calls/group/calls_group_panel.cpp @@ -888,31 +888,6 @@ void Panel::enlargeVideo() { } } -void Panel::minimizeVideo() { - if (window()->windowState() & Qt::WindowMaximized) { - _lastLargeMaximized = true; - window()->setWindowState( - window()->windowState() & ~Qt::WindowMaximized); - } else { - _lastLargeMaximized = false; - _lastLargeGeometry = window()->geometry(); - } - const auto available = window()->screen()->availableGeometry(); - const auto width = st::groupCallWidth; - const auto height = _call->rtmp() - ? st::groupCallHeightRtmpMin - : st::groupCallHeight; - const auto geometry = QRect( - window()->x() + (window()->width() - width) / 2, - window()->y() + (window()->height() - height) / 2, - width, - height); - window()->setGeometry((_lastSmallGeometry - && available.intersects(*_lastSmallGeometry)) - ? *_lastSmallGeometry - : geometry); -} - void Panel::raiseControls() { if (_controlsBackgroundWide) { _controlsBackgroundWide->raise(); @@ -1501,12 +1476,18 @@ rpl::lifetime &Panel::lifetime() { void Panel::initGeometry() { const auto center = Core::App().getPointForCallPanelCenter(); - const auto height = (_call->rtmp() && !_call->canManage()) + const auto width = _call->rtmp() + ? st::groupCallWidthRtmp + : st::groupCallWidth; + const auto height = _call->rtmp() + ? st::groupCallHeightRtmp + : st::groupCallHeight; + const auto minHeight = (_call->rtmp() && !_call->canManage()) ? st::groupCallHeightRtmpMin : st::groupCallHeight; - const auto rect = QRect(0, 0, st::groupCallWidth, height); + const auto rect = QRect(0, 0, width, height); window()->setGeometry(rect.translated(center - rect.center())); - window()->setMinimumSize(rect.size()); + window()->setMinimumSize({ st::groupCallWidth, minHeight }); window()->show(); } diff --git a/Telegram/SourceFiles/calls/group/calls_group_panel.h b/Telegram/SourceFiles/calls/group/calls_group_panel.h index e7a3688e6..b057f29f2 100644 --- a/Telegram/SourceFiles/calls/group/calls_group_panel.h +++ b/Telegram/SourceFiles/calls/group/calls_group_panel.h @@ -134,7 +134,6 @@ private: void trackControls(bool track, bool force = false); void raiseControls(); void enlargeVideo(); - void minimizeVideo(); void trackControl(Ui::RpWidget *widget, rpl::lifetime &lifetime); void trackControlOver(not_null control, bool over);