mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Improve "Pin on top" icon in RTMP streams.
This commit is contained in:
parent
b5aafa521a
commit
37e5157d5a
6 changed files with 14 additions and 32 deletions
BIN
Telegram/Resources/icons/calls/navbar_pin.png
Normal file
BIN
Telegram/Resources/icons/calls/navbar_pin.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 445 B |
BIN
Telegram/Resources/icons/calls/navbar_pin@2x.png
Normal file
BIN
Telegram/Resources/icons/calls/navbar_pin@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 748 B |
BIN
Telegram/Resources/icons/calls/navbar_pin@3x.png
Normal file
BIN
Telegram/Resources/icons/calls/navbar_pin@3x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1 KiB |
|
@ -493,6 +493,8 @@ callErrorToast: Toast(defaultToast) {
|
||||||
|
|
||||||
groupCallWidth: 380px;
|
groupCallWidth: 380px;
|
||||||
groupCallHeight: 580px;
|
groupCallHeight: 580px;
|
||||||
|
groupCallWidthRtmp: 720px;
|
||||||
|
groupCallHeightRtmp: 580px;
|
||||||
groupCallHeightRtmpMin: 280px;
|
groupCallHeightRtmpMin: 280px;
|
||||||
|
|
||||||
groupCallRipple: RippleAnimation(defaultRippleAnimation) {
|
groupCallRipple: RippleAnimation(defaultRippleAnimation) {
|
||||||
|
@ -1121,9 +1123,9 @@ groupCallTitle: WindowTitle(defaultWindowTitle) {
|
||||||
closeIconActiveOver: groupCallTitleCloseIconOver;
|
closeIconActiveOver: groupCallTitleCloseIconOver;
|
||||||
}
|
}
|
||||||
groupCallPinOnTop: IconButton(groupCallTitleButton) {
|
groupCallPinOnTop: IconButton(groupCallTitleButton) {
|
||||||
icon: icon{{ "dialogs/dialogs_pinned", groupCallMemberNotJoinedStatus }};
|
icon: icon{{ "calls/navbar_pin", groupCallMemberNotJoinedStatus }};
|
||||||
iconOver: icon{{ "dialogs/dialogs_pinned", groupCallMembersFg }};
|
iconOver: icon{{ "calls/navbar_pin", groupCallMembersFg }};
|
||||||
iconPosition: point(8px, 4px);
|
iconPosition: point(0px, 4px);
|
||||||
}
|
}
|
||||||
|
|
||||||
groupCallMajorBlobIdleRadius: 2px;
|
groupCallMajorBlobIdleRadius: 2px;
|
||||||
|
|
|
@ -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() {
|
void Panel::raiseControls() {
|
||||||
if (_controlsBackgroundWide) {
|
if (_controlsBackgroundWide) {
|
||||||
_controlsBackgroundWide->raise();
|
_controlsBackgroundWide->raise();
|
||||||
|
@ -1501,12 +1476,18 @@ rpl::lifetime &Panel::lifetime() {
|
||||||
|
|
||||||
void Panel::initGeometry() {
|
void Panel::initGeometry() {
|
||||||
const auto center = Core::App().getPointForCallPanelCenter();
|
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::groupCallHeightRtmpMin
|
||||||
: st::groupCallHeight;
|
: 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()->setGeometry(rect.translated(center - rect.center()));
|
||||||
window()->setMinimumSize(rect.size());
|
window()->setMinimumSize({ st::groupCallWidth, minHeight });
|
||||||
window()->show();
|
window()->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,6 @@ private:
|
||||||
void trackControls(bool track, bool force = false);
|
void trackControls(bool track, bool force = false);
|
||||||
void raiseControls();
|
void raiseControls();
|
||||||
void enlargeVideo();
|
void enlargeVideo();
|
||||||
void minimizeVideo();
|
|
||||||
|
|
||||||
void trackControl(Ui::RpWidget *widget, rpl::lifetime &lifetime);
|
void trackControl(Ui::RpWidget *widget, rpl::lifetime &lifetime);
|
||||||
void trackControlOver(not_null<Ui::RpWidget*> control, bool over);
|
void trackControlOver(not_null<Ui::RpWidget*> control, bool over);
|
||||||
|
|
Loading…
Add table
Reference in a new issue