1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 05:35:06 +00:00

WindowServer: Add 2px of tasteful space above maximized windows

This makes the visual interaction between the menu bar and the window
a lot less janky looking.
This commit is contained in:
Andreas Kling 2020-05-10 14:46:23 +02:00
parent 61e112d3b7
commit c6f098c5a9

View file

@ -1252,6 +1252,10 @@ Gfx::Rect WindowManager::maximized_window_rect(const Window& window) const
return IterationDecision::Break;
});
constexpr int tasteful_space_above_maximized_window = 2;
rect.set_y(rect.y() + tasteful_space_above_maximized_window);
rect.set_height(rect.height() - tasteful_space_above_maximized_window);
return rect;
}