1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 17:17:35 +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

@ -30,6 +30,7 @@
#include <AK/String.h>
#include <AK/WeakPtr.h>
#include <LibCore/Object.h>
#include <LibGfx/Font.h>
#include <LibGfx/Forward.h>
#include <LibGfx/Rect.h>
#include <WindowServer/Cursor.h>
@ -96,6 +97,8 @@ public:
void draw();
const Gfx::Font& font() const;
const Gfx::Font& title_font() const;
void set_title_font(const Gfx::Font& font);
MenuItem* item_with_identifier(unsigned);
void redraw();
@ -119,6 +122,8 @@ public:
private:
virtual void event(Core::Event&) override;
RefPtr<Gfx::Font> m_title_font { &Gfx::Font::default_font() };
void handle_mouse_move_event(const MouseEvent&);
int visible_item_count() const;