2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Fix members dropdown and chat info menu position.

This commit is contained in:
John Preston
2017-04-11 17:27:46 +03:00
parent 0e2c282476
commit 7f7318c0bf
2 changed files with 3 additions and 3 deletions

View File

@@ -108,7 +108,7 @@ void TopBarWidget::showMenu() {
if (auto main = App::main()) {
if (auto peer = main->peer()) {
if (!_menu) {
_menu.create(App::main());
_menu.create(parentWidget());
_menu->setHiddenCallback([that = weak(this), menu = _menu.data()] {
menu->deleteLater();
if (that && that->_menu == menu) {
@@ -130,7 +130,7 @@ void TopBarWidget::showMenu() {
App::main()->fillPeerMenu(peer, [this](const QString &text, base::lambda<void()> callback) {
return _menu->addAction(text, std::move(callback));
}, false);
_menu->moveToRight(st::topBarMenuPosition.x(), st::topBarMenuPosition.y());
_menu->moveToRight((parentWidget()->width() - width()) + st::topBarMenuPosition.x(), st::topBarMenuPosition.y());
_menu->showAnimated(Ui::PanelAnimation::Origin::TopRight);
}
}