summaryrefslogtreecommitdiff
path: root/WindowServer/WSMenu.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-02-11 10:19:56 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-02-11 10:19:56 +0100
commit78fc7a9ef252a6ab44c4ca1fffc5b8849209c924 (patch)
tree37e5d0832b26cf2f79bf774fdf759d92fc816f44 /WindowServer/WSMenu.cpp
parent5f288014d4d0ed8ecae6196c7495550a770e48a6 (diff)
downloadserenity-78fc7a9ef252a6ab44c4ca1fffc5b8849209c924.zip
WindowServer: Menu windows should be at least as wide as their menubar rects.
Diffstat (limited to 'WindowServer/WSMenu.cpp')
-rw-r--r--WindowServer/WSMenu.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/WindowServer/WSMenu.cpp b/WindowServer/WSMenu.cpp
index 00c4c39241..0086c56834 100644
--- a/WindowServer/WSMenu.cpp
+++ b/WindowServer/WSMenu.cpp
@@ -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());