mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Adapt to TitleControlsLayout change
This commit is contained in:
parent
73b3f7e298
commit
bf26de495a
3 changed files with 5 additions and 6 deletions
|
@ -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(); });
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -224,10 +224,8 @@ rpl::producer<> DefaultOverlayWidgetHelper::controlsActivations() {
|
|||
}
|
||||
|
||||
rpl::producer<bool> 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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue