LibGUI: Let Buttons set their menu popup position

The previous ButtonStyle::Tray conditional was a hack for Statusbars.
This commit is contained in:
thankyouverycool 2022-07-27 13:52:37 -04:00 committed by Andreas Kling
commit 58955d37cc
Notes: sideshowbarker 2024-07-17 08:26:32 +09:00
3 changed files with 27 additions and 3 deletions

View file

@ -133,6 +133,7 @@ Statusbar::Segment::Segment()
set_focus_policy(GUI::FocusPolicy::NoFocus);
set_button_style(Gfx::ButtonStyle::Tray);
set_text_alignment(Gfx::TextAlignment::CenterLeft);
set_menu_position(GUI::Button::MenuPosition::TopRight);
}
void Statusbar::Segment::paint_event(PaintEvent& event)