mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:47:35 +00:00
WindowServer+LibGfx: Remove code for drawing the old-style menu bar
This commit is contained in:
parent
19c578024b
commit
0e798234c7
12 changed files with 6 additions and 79 deletions
|
@ -141,7 +141,7 @@ Window& Menu::ensure_menu_window()
|
|||
next_item_location.move_by(0, height);
|
||||
}
|
||||
|
||||
int window_height_available = Screen::the().height() - MenuManager::the().menubar_rect().height() - frame_thickness() * 2;
|
||||
int window_height_available = Screen::the().height() - frame_thickness() * 2;
|
||||
int max_window_height = (window_height_available / item_height()) * item_height() + frame_thickness() * 2;
|
||||
int content_height = m_items.is_empty() ? 0 : (m_items.last().rect().bottom() + 1) + frame_thickness();
|
||||
int window_height = min(max_window_height, content_height);
|
||||
|
@ -592,9 +592,6 @@ void Menu::do_popup(const Gfx::IntPoint& position, bool make_input, bool as_subm
|
|||
adjusted_pos = adjusted_pos.translated(0, item_height());
|
||||
}
|
||||
|
||||
if (adjusted_pos.y() < MenuManager::the().menubar_rect().height())
|
||||
adjusted_pos.set_y(MenuManager::the().menubar_rect().height());
|
||||
|
||||
window.move_to(adjusted_pos);
|
||||
window.set_visible(true);
|
||||
MenuManager::the().open_menu(*this, make_input);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue