diff --git a/Telegram/SourceFiles/calls/group/calls_group_panel.cpp b/Telegram/SourceFiles/calls/group/calls_group_panel.cpp index 1e2e29e1a..4ae84ffcc 100644 --- a/Telegram/SourceFiles/calls/group/calls_group_panel.cpp +++ b/Telegram/SourceFiles/calls/group/calls_group_panel.cpp @@ -1612,7 +1612,7 @@ void Panel::initLayout() { #ifndef Q_OS_MAC _controls->wrap.raise(); - Ui::Platform::TitleControlsLayoutChanged( + _controls->controls.layout().changes( ) | rpl::start_with_next([=] { // _menuToggle geometry depends on _controls arrangement. crl::on_main(widget(), [=] { updateControlsGeometry(); }); diff --git a/Telegram/SourceFiles/media/view/media_view_pip.cpp b/Telegram/SourceFiles/media/view/media_view_pip.cpp index 66ba74cd0..159c8795f 100644 --- a/Telegram/SourceFiles/media/view/media_view_pip.cpp +++ b/Telegram/SourceFiles/media/view/media_view_pip.cpp @@ -1259,7 +1259,8 @@ void Pip::setupButtons() { rect.y(), volumeToggleWidth, volumeToggleHeight); - if (!Ui::Platform::TitleControlsLayout().onLeft()) { + using Ui::Platform::TitleControlsLayout; + if (!TitleControlsLayout::Create()->current().onLeft()) { _close.area.moveLeft(rect.x() + rect.width() - (_close.area.x() - rect.x()) diff --git a/Telegram/SourceFiles/platform/platform_overlay_widget.cpp b/Telegram/SourceFiles/platform/platform_overlay_widget.cpp index 32274eb62..3e07e8b97 100644 --- a/Telegram/SourceFiles/platform/platform_overlay_widget.cpp +++ b/Telegram/SourceFiles/platform/platform_overlay_widget.cpp @@ -224,10 +224,8 @@ rpl::producer<> DefaultOverlayWidgetHelper::controlsActivations() { } rpl::producer DefaultOverlayWidgetHelper::controlsSideRightValue() { - using namespace Ui::Platform; - - return TitleControlsLayoutValue( - ) | rpl::map([=](const TitleControls::Layout &layout) { + return _controls->controls.layout().value( + ) | rpl::map([=](const auto &layout) { return !layout.onLeft(); }) | rpl::distinct_until_changed(); }