@@ -403,6 +403,16 @@ void TopBarWidget::showPeerMenu() {
403403 Window::FillDialogsEntryMenu (_controller, _activeChat, addAction);
404404 if (_menu->empty ()) {
405405 closeMenu ();
406+ } else if (_narrowRatio > 0 .) {
407+ _menu->setForcedOrigin (Ui::PanelAnimation::Origin::TopLeft);
408+ _menu->popup (Ui::PopupMenu::ConstrainToParentScreen (
409+ _menu,
410+ mapToGlobal (
411+ QPoint (
412+ -st::topBarMenuPosition.x ()
413+ - Ui::BoxShadow::ExtendFor (
414+ _menu->st ().shadow ).left (),
415+ st::topBarMenuPosition.y ()))));
406416 } else {
407417 _menu->setForcedOrigin (Ui::PanelAnimation::Origin::TopRight);
408418 _menu->popup (Ui::PopupMenu::ConstrainToParentScreen (
@@ -1260,7 +1270,19 @@ void TopBarWidget::updateControlsGeometry() {
12601270 }
12611271
12621272 _rightTaken = 0 ;
1263- _menuToggle->moveToRight (_rightTaken, otherButtonsTop);
1273+ if (rootChatsListBar () && _activeChat.key .folder ()) {
1274+ const auto &toggle = st::topBarMenuToggle;
1275+ const auto narrowLeft = (_narrowWidth - toggle.icon .width ()) / 2
1276+ - toggle.iconPosition .x ();
1277+ _menuToggle->moveToLeft (
1278+ anim::interpolate (
1279+ width () - _menuToggle->width (),
1280+ narrowLeft,
1281+ _narrowRatio),
1282+ otherButtonsTop);
1283+ } else {
1284+ _menuToggle->moveToRight (_rightTaken, otherButtonsTop);
1285+ }
12641286 if (_menuToggle->isHidden ()) {
12651287 _rightTaken += (_menuToggle->width () - _search->width ());
12661288 } else {
@@ -1384,7 +1406,8 @@ void TopBarWidget::updateControlsVisibility() {
13841406 }
13851407 _menuToggle->setVisible (hasMenu
13861408 && !_chooseForReportReason
1387- && (_narrowRatio < 1 .));
1409+ && (_narrowRatio < 1 .
1410+ || (rootChatsListBar () && _activeChat.key .folder ())));
13881411 _infoToggle->setVisible (hasInfo
13891412 && !isOneColumn
13901413 && _controller->canShowThirdSection ()
0 commit comments