From 4ec698d1b01d7efc918fbdd3ac38d2fff839ee62 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 27 Aug 2019 13:49:48 +0200 Subject: [PATCH] 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. :^) --- Servers/WindowServer/WSMenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Servers/WindowServer/WSMenu.cpp b/Servers/WindowServer/WSMenu.cpp index b468d81f37..1484728e58 100644 --- a/Servers/WindowServer/WSMenu.cpp +++ b/Servers/WindowServer/WSMenu.cpp @@ -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()