1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:08:13 +00:00

WindowServer: Menu windows should be at least as wide as their menubar rects.

This commit is contained in:
Andreas Kling 2019-02-11 10:19:56 +01:00
parent 5f288014d4
commit 78fc7a9ef2

View file

@ -33,7 +33,7 @@ int WSMenu::width() const
longest = max(longest, font().width(item->text()));
}
return max(longest, 80) + padding() * 2;
return max(longest, rect_in_menubar().width()) + padding() * 2;
}
int WSMenu::height() const
@ -72,7 +72,6 @@ WSWindow& WSMenu::ensure_menu_window()
return *m_menu_window;
}
void WSMenu::draw()
{
ASSERT(menu_window());