1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:28:11 +00:00

WindowServer: Control menu title font from menubar

It makes a little more sense for the menubar to control what the font of
the menu title is, as opposed to the menu manager. Menumanager now
simply uses the font that the menu wants it to use.
This commit is contained in:
Shannon Booth 2020-03-10 20:56:07 +13:00 committed by Andreas Kling
parent dc0b091c31
commit e9687ee50e
6 changed files with 30 additions and 24 deletions

View file

@ -41,4 +41,15 @@ MenuBar::~MenuBar()
{
}
void MenuBar::add_menu(Menu& menu)
{
menu.set_menubar(this);
// NOTE: We assume that the first menu is the App menu, which has a bold font.
if (m_menus.is_empty())
menu.set_title_font(Gfx::Font::default_bold_font());
m_menus.append(&menu);
}
}