mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:07:45 +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:
parent
b9f81b91a6
commit
988c6fea19
1 changed files with 4 additions and 1 deletions
|
@ -189,7 +189,10 @@ void Button::set_menu(RefPtr<GUI::Menu> menu)
|
||||||
void Button::mousedown_event(MouseEvent& event)
|
void Button::mousedown_event(MouseEvent& event)
|
||||||
{
|
{
|
||||||
if (m_menu) {
|
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();
|
update();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue