mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +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:
parent
1084eaea0b
commit
58955d37cc
Notes:
sideshowbarker
2024-07-17 08:26:32 +09:00
Author: https://github.com/thankyouverycool
Commit: 58955d37cc
Pull-request: https://github.com/SerenityOS/serenity/pull/14706
Issue: https://github.com/SerenityOS/serenity/issues/14634
Reviewed-by: https://github.com/FireFox317
3 changed files with 27 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue