Improve UIMenu positioning (allow to take into account the trigger button to position).

This commit is contained in:
Martín Lucas Golini
2026-01-01 14:17:10 -03:00
parent d9d0a3539b
commit 014d2b767c
3 changed files with 45 additions and 6 deletions

View File

@@ -449,7 +449,7 @@ LLMChatUI::LLMChatUI( PluginManager* manager ) :
menu->runOnMainThread( [this, menu] {
auto pos( mChatAttach->getScreenPos() );
UIMenu::findBestMenuPos( pos, menu );
UIMenu::findBestMenuPos( pos, menu, nullptr, nullptr, mChatAttach );
menu->showAtScreenPosition( pos );
} );
} );
@@ -516,7 +516,7 @@ LLMChatUI::LLMChatUI( PluginManager* manager ) :
menu->runOnMainThread( [this, menu] {
auto pos( mChatMore->getScreenPos() );
UIMenu::findBestMenuPos( pos, menu );
UIMenu::findBestMenuPos( pos, menu, nullptr, nullptr, mChatMore );
menu->showAtScreenPosition( pos );
} );
} );