mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:47:34 +00:00
WindowServer: Use font height for item heights in Menus
The height of menu items was relatively small on larger fonts.
This commit is contained in:
parent
11f82a32d4
commit
fe47e66438
2 changed files with 6 additions and 1 deletions
|
@ -95,6 +95,11 @@ int Menu::content_width() const
|
||||||
return max(widest_item, rect_in_window_menubar().width()) + horizontal_padding() + frame_thickness() * 2;
|
return max(widest_item, rect_in_window_menubar().width()) + horizontal_padding() + frame_thickness() * 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Menu::item_height() const
|
||||||
|
{
|
||||||
|
return max(font().preferred_line_height(), s_item_icon_width + 2) + 4;
|
||||||
|
}
|
||||||
|
|
||||||
void Menu::redraw()
|
void Menu::redraw()
|
||||||
{
|
{
|
||||||
if (!menu_window())
|
if (!menu_window())
|
||||||
|
|
|
@ -86,7 +86,7 @@ public:
|
||||||
|
|
||||||
int content_width() const;
|
int content_width() const;
|
||||||
|
|
||||||
static constexpr int item_height() { return 22; }
|
int item_height() const;
|
||||||
static constexpr int frame_thickness() { return 2; }
|
static constexpr int frame_thickness() { return 2; }
|
||||||
static constexpr int horizontal_padding() { return left_padding() + right_padding(); }
|
static constexpr int horizontal_padding() { return left_padding() + right_padding(); }
|
||||||
static constexpr int left_padding() { return 14; }
|
static constexpr int left_padding() { return 14; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue