1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 15:27:35 +00:00

WindowServer: Remove unused Menu->MenuBar link and "title font"

We kept a backpointer from the Menu to its containing MenuBar, but it
was not used for anything so let's remove it.

Since all menus have the same font now, there's no need to track a
separate "title font".
This commit is contained in:
Andreas Kling 2021-03-26 09:11:44 +01:00
parent dfb81242f3
commit 6203a4a2e9
3 changed files with 2 additions and 29 deletions

View file

@ -54,10 +54,6 @@ public:
const ClientConnection* client() const { return m_client; }
int menu_id() const { return m_menu_id; }
MenuBar* menubar() { return m_menubar; }
const MenuBar* menubar() const { return m_menubar; }
void set_menubar(MenuBar* menubar) { m_menubar = menubar; }
bool is_empty() const { return m_items.is_empty(); }
int item_count() const { return m_items.size(); }
const MenuItem& item(int index) const { return m_items.at(index); }
@ -99,8 +95,6 @@ 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();
@ -135,8 +129,6 @@ public:
private:
virtual void event(Core::Event&) override;
RefPtr<Gfx::Font> m_title_font { &Gfx::FontDatabase::default_font() };
void handle_mouse_move_event(const MouseEvent&);
int visible_item_count() const;
@ -150,7 +142,6 @@ private:
String m_name;
Gfx::IntRect m_rect_in_window_menubar;
Gfx::IntRect m_text_rect_in_window_menubar;
MenuBar* m_menubar { nullptr };
NonnullOwnPtrVector<MenuItem> m_items;
RefPtr<Window> m_menu_window;