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

WindowServer: Fix off-by-one in menu height calculation

This removes the unecessary empty scanline at the bottom of menus and
makes it look nice and tidy when the bottom item is highlighted. :^)
This commit is contained in:
Andreas Kling 2019-08-27 13:49:48 +02:00
parent a3788f1297
commit 4ec698d1b0

View file

@ -75,7 +75,7 @@ int WSMenu::height() const
{
if (m_items.is_empty())
return 0;
return (m_items.last().rect().bottom() - 1) + frame_thickness() * 2;
return (m_items.last().rect().bottom() + 1) + frame_thickness();
}
void WSMenu::redraw()