2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 23:15:59 +00:00

Active round video moving to active window.

This commit is contained in:
John Preston
2023-01-19 11:40:39 +04:00
parent b80b770631
commit ec3957fcf3
14 changed files with 140 additions and 78 deletions

View File

@@ -271,9 +271,9 @@ MainWidget::MainWidget(
_callTopBar->finishAnimating();
}
if (isPrimary()) {
Core::App().setDefaultFloatPlayerDelegate(floatPlayerDelegate());
}
controller->window().setDefaultFloatPlayerDelegate(
floatPlayerDelegate());
Core::App().floatPlayerClosed(
) | rpl::start_with_next([=](FullMsgId itemId) {
floatPlayerClosed(itemId);
@@ -431,6 +431,15 @@ not_null<Ui::RpWidget*> MainWidget::floatPlayerWidget() {
return this;
}
void MainWidget::floatPlayerToggleGifsPaused(bool paused) {
constexpr auto kReason = Window::GifPauseReason::RoundPlaying;
if (paused) {
_controller->enableGifPauseReason(kReason);
} else {
_controller->disableGifPauseReason(kReason);
}
}
auto MainWidget::floatPlayerGetSection(Window::Column column)
-> not_null<Media::Player::FloatSectionDelegate*> {
if (isThreeColumn()) {