mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-15 19:21:38 +00:00
WindowServer: Add const qualified version of MenuItem::submenu()
This commit is contained in:
parent
f06c12173c
commit
08064ed219
Notes:
sideshowbarker
2024-07-19 06:31:27 +09:00
Author: https://github.com/shannonbooth Commit: https://github.com/SerenityOS/serenity/commit/08064ed219d Pull-request: https://github.com/SerenityOS/serenity/pull/2282
2 changed files with 8 additions and 0 deletions
|
@ -78,6 +78,13 @@ Menu* MenuItem::submenu()
|
|||
return m_menu.client()->find_menu_by_id(m_submenu_id);
|
||||
}
|
||||
|
||||
const Menu* MenuItem::submenu() const
|
||||
{
|
||||
ASSERT(is_submenu());
|
||||
ASSERT(m_menu.client());
|
||||
return m_menu.client()->find_menu_by_id(m_submenu_id);
|
||||
}
|
||||
|
||||
Gfx::Rect MenuItem::rect() const
|
||||
{
|
||||
if (!m_menu.is_scrollable())
|
||||
|
|
|
@ -77,6 +77,7 @@ public:
|
|||
void set_submenu_id(int submenu_id) { m_submenu_id = submenu_id; }
|
||||
|
||||
Menu* submenu();
|
||||
const Menu* submenu() const;
|
||||
|
||||
bool is_exclusive() const { return m_exclusive; }
|
||||
void set_exclusive(bool exclusive) { m_exclusive = exclusive; }
|
||||
|
|
Loading…
Reference in a new issue