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

WindowServer+LibGfx: Rename menu_bar => menubar

We had a mix of "menu_bar" and "menubar". Let's just use "menubar"
everywhere since that feels the most natural to write.
This commit is contained in:
Andreas Kling 2021-03-31 23:26:32 +02:00
parent 0e798234c7
commit ea34ba6fa6
5 changed files with 9 additions and 9 deletions

View file

@ -971,7 +971,7 @@ void Window::set_menubar(MenuBar* menubar)
auto& wm = WindowManager::the();
Gfx::IntPoint next_menu_location { 0, 0 };
auto menubar_rect = Gfx::WindowTheme::current().menu_bar_rect(Gfx::WindowTheme::WindowType::Normal, rect(), wm.palette(), 1);
auto menubar_rect = Gfx::WindowTheme::current().menubar_rect(Gfx::WindowTheme::WindowType::Normal, rect(), wm.palette(), 1);
m_menubar->for_each_menu([&](Menu& menu) {
int text_width = wm.font().width(menu.name());
menu.set_rect_in_window_menubar({ next_menu_location.x(), 0, text_width + menubar_menu_margin, menubar_rect.height() });

View file

@ -240,7 +240,7 @@ Gfx::IntRect WindowFrame::menubar_rect() const
{
if (!m_window.menubar() || !m_window.should_show_menubar())
return {};
return Gfx::WindowTheme::current().menu_bar_rect(to_theme_window_type(m_window.type()), m_window.rect(), WindowManager::the().palette(), menu_row_count());
return Gfx::WindowTheme::current().menubar_rect(to_theme_window_type(m_window.type()), m_window.rect(), WindowManager::the().palette(), menu_row_count());
}
Gfx::IntRect WindowFrame::title_bar_rect() const