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
Notes: sideshowbarker 2024-07-19 12:29:43 +09:00

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()