1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:38:12 +00:00

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
parent 1084eaea0b
commit 58955d37cc
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)