diff --git a/Userland/Services/WindowServer/Menu.cpp b/Userland/Services/WindowServer/Menu.cpp index 70b3c51407..ab2a5bba77 100644 --- a/Userland/Services/WindowServer/Menu.cpp +++ b/Userland/Services/WindowServer/Menu.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020, Andreas Kling + * Copyright (c) 2018-2021, Andreas Kling * Copyright (c) 2020, Shannon Booth * All rights reserved. * @@ -55,16 +55,6 @@ Menu::~Menu() { } -void Menu::set_title_font(const Gfx::Font& font) -{ - m_title_font = &font; -} - -const Gfx::Font& Menu::title_font() const -{ - return *m_title_font; -} - const Gfx::Font& Menu::font() const { return Gfx::FontDatabase::default_font(); diff --git a/Userland/Services/WindowServer/Menu.h b/Userland/Services/WindowServer/Menu.h index e5bf27f8eb..3a35f727ac 100644 --- a/Userland/Services/WindowServer/Menu.h +++ b/Userland/Services/WindowServer/Menu.h @@ -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 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 m_items; RefPtr m_menu_window; diff --git a/Userland/Services/WindowServer/MenuBar.cpp b/Userland/Services/WindowServer/MenuBar.cpp index 30d739aaf7..cf2f9814c9 100644 --- a/Userland/Services/WindowServer/MenuBar.cpp +++ b/Userland/Services/WindowServer/MenuBar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020, Andreas Kling + * Copyright (c) 2018-2021, Andreas Kling * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,8 +26,6 @@ #include "MenuBar.h" #include "Menu.h" -#include "MenuItem.h" -#include namespace WindowServer { @@ -43,12 +41,6 @@ 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::FontDatabase::default_bold_font()); - m_menus.append(&menu); }