mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibGUI: Prefer to pop-up Tray Button menus from the top right
Fixes menus obscuring SegmentWidgets in status bars.
This commit is contained in:
committed by
Andreas Kling
parent
b9f81b91a6
commit
988c6fea19
@@ -189,7 +189,10 @@ void Button::set_menu(RefPtr<GUI::Menu> menu)
|
||||
void Button::mousedown_event(MouseEvent& event)
|
||||
{
|
||||
if (m_menu) {
|
||||
m_menu->popup(screen_relative_rect().top_left());
|
||||
if (button_style() == Gfx::ButtonStyle::Tray)
|
||||
m_menu->popup(screen_relative_rect().top_right());
|
||||
else
|
||||
m_menu->popup(screen_relative_rect().top_left());
|
||||
update();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user