mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Set forced origin for left userpic menu for constant distance to items.
This commit is contained in:
@@ -2524,6 +2524,7 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
|
||||
if (_menu->empty()) {
|
||||
_menu = nullptr;
|
||||
} else {
|
||||
_menu->setForcedOrigin(Ui::PanelAnimation::Origin::BottomLeft);
|
||||
_menu->popup(e->globalPos());
|
||||
e->accept();
|
||||
}
|
||||
|
||||
@@ -2935,6 +2935,7 @@ void ListWidget::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
|
||||
return contextView ? contextView->data().get() : overItem;
|
||||
}(),
|
||||
Ui::Menu::CreateAddActionCallback(_menu.get()));
|
||||
_menu->setForcedOrigin(Ui::PanelAnimation::Origin::BottomLeft);
|
||||
_menu->popup(e->globalPos());
|
||||
e->accept();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user