mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:37:46 +00:00
WindowServer+LibGfx: Show menus in windows! :^)
This patch begins the transition away from the global menu towards per-window menus instead. The global menu looks neat, but has always felt clunky, and there are a number of usability problems with it, especially in programs with multiple windows. You can now call GUI::Window::set_menubar() to add a menubar to your window. It will be specific to that one window only.
This commit is contained in:
parent
1daaa4f38d
commit
e76771bfad
21 changed files with 335 additions and 44 deletions
|
@ -145,10 +145,10 @@ void PreviewWidget::paint_event(GUI::PaintEvent& event)
|
|||
button.rect = rect;
|
||||
}
|
||||
|
||||
auto frame_rect = Gfx::WindowTheme::current().frame_rect_for_window(Gfx::WindowTheme::WindowType::Normal, rect, m_preview_palette);
|
||||
auto frame_rect = Gfx::WindowTheme::current().frame_rect_for_window(Gfx::WindowTheme::WindowType::Normal, rect, m_preview_palette, 0);
|
||||
Gfx::PainterStateSaver saver(painter);
|
||||
painter.translate(frame_rect.location());
|
||||
Gfx::WindowTheme::current().paint_normal_frame(painter, state, rect, title, icon, m_preview_palette, buttons.last().rect);
|
||||
Gfx::WindowTheme::current().paint_normal_frame(painter, state, rect, title, icon, m_preview_palette, buttons.last().rect, 0);
|
||||
|
||||
for (auto& button : buttons) {
|
||||
Gfx::StylePainter::paint_button(painter, button.rect, m_preview_palette, Gfx::ButtonStyle::Normal, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue