mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:47:34 +00:00
WindowServer: Bump height of window titlebars and menus from 16 to 18.
This commit is contained in:
parent
ae90043424
commit
88e77fe3af
2 changed files with 5 additions and 5 deletions
|
@ -52,7 +52,7 @@ public:
|
||||||
int width() const;
|
int width() const;
|
||||||
int height() const;
|
int height() const;
|
||||||
|
|
||||||
int item_height() const { return 16; }
|
int item_height() const { return 18; }
|
||||||
int vertical_padding() const { return 4; }
|
int vertical_padding() const { return 4; }
|
||||||
int horizontal_padding() const { return left_padding() + right_padding(); }
|
int horizontal_padding() const { return left_padding() + right_padding(); }
|
||||||
int left_padding() const { return 14; }
|
int left_padding() const { return 14; }
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#define RESIZE_DEBUG
|
#define RESIZE_DEBUG
|
||||||
#define USE_WALLPAPER
|
#define USE_WALLPAPER
|
||||||
|
|
||||||
static const int window_titlebar_height = 16;
|
static const int window_titlebar_height = 18;
|
||||||
|
|
||||||
static inline Rect menu_window_rect(const Rect& rect)
|
static inline Rect menu_window_rect(const Rect& rect)
|
||||||
{
|
{
|
||||||
|
@ -329,11 +329,11 @@ void WSWindowManager::set_current_menubar(WSMenuBar* menubar)
|
||||||
else
|
else
|
||||||
m_current_menubar = nullptr;
|
m_current_menubar = nullptr;
|
||||||
dbgprintf("[WM] Current menubar is now %p\n", menubar);
|
dbgprintf("[WM] Current menubar is now %p\n", menubar);
|
||||||
Point next_menu_location { menubar_menu_margin() / 2, 3 };
|
Point next_menu_location { menubar_menu_margin() / 2, 0 };
|
||||||
for_each_active_menubar_menu([&] (WSMenu& menu) {
|
for_each_active_menubar_menu([&] (WSMenu& menu) {
|
||||||
int text_width = font().width(menu.name());
|
int text_width = font().width(menu.name());
|
||||||
menu.set_rect_in_menubar({ next_menu_location.x() - menubar_menu_margin() / 2, 0, text_width + menubar_menu_margin(), menubar_rect().height() - 1 });
|
menu.set_rect_in_menubar({ next_menu_location.x() - menubar_menu_margin() / 2, 0, text_width + menubar_menu_margin(), menubar_rect().height() - 1 });
|
||||||
menu.set_text_rect_in_menubar({ next_menu_location, { text_width, font().glyph_height() } });
|
menu.set_text_rect_in_menubar({ next_menu_location, { text_width, menubar_rect().height() } });
|
||||||
next_menu_location.move_by(menu.rect_in_menubar().width(), 0);
|
next_menu_location.move_by(menu.rect_in_menubar().width(), 0);
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
@ -889,7 +889,7 @@ void WSWindowManager::invalidate_cursor()
|
||||||
|
|
||||||
Rect WSWindowManager::menubar_rect() const
|
Rect WSWindowManager::menubar_rect() const
|
||||||
{
|
{
|
||||||
return { 0, 0, m_screen_rect.width(), 16 };
|
return { 0, 0, m_screen_rect.width(), 18 };
|
||||||
}
|
}
|
||||||
|
|
||||||
void WSWindowManager::draw_menubar()
|
void WSWindowManager::draw_menubar()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue