mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
WindowServer: Tweak width/height of automatic window tile rects
The resulting window rects when snapping to some edges/corners were a bit lopsided. This patch makes them symmetrical. :^)
This commit is contained in:
@@ -764,12 +764,12 @@ Gfx::IntRect Window::tiled_rect(WindowTileType tiled) const
|
||||
case WindowTileType::Top:
|
||||
return Gfx::IntRect(0,
|
||||
menu_height,
|
||||
Screen::the().width() - frame_width,
|
||||
Screen::the().width(),
|
||||
(max_height - titlebar_height) / 2 - frame_width);
|
||||
case WindowTileType::Bottom:
|
||||
return Gfx::IntRect(0,
|
||||
menu_height + (titlebar_height + max_height) / 2 + frame_width,
|
||||
Screen::the().width() - frame_width,
|
||||
Screen::the().width(),
|
||||
(max_height - titlebar_height) / 2 - frame_width);
|
||||
case WindowTileType::TopLeft:
|
||||
return Gfx::IntRect(0,
|
||||
@@ -785,12 +785,12 @@ Gfx::IntRect Window::tiled_rect(WindowTileType tiled) const
|
||||
return Gfx::IntRect(0,
|
||||
menu_height + (titlebar_height + max_height) / 2 + frame_width,
|
||||
Screen::the().width() / 2 - frame_width,
|
||||
(max_height - titlebar_height) / 2);
|
||||
(max_height - titlebar_height) / 2 - frame_width);
|
||||
case WindowTileType::BottomRight:
|
||||
return Gfx::IntRect(Screen::the().width() / 2 + frame_width,
|
||||
menu_height + (titlebar_height + max_height) / 2 + frame_width,
|
||||
Screen::the().width() / 2 - frame_width,
|
||||
(max_height - titlebar_height) / 2);
|
||||
(max_height - titlebar_height) / 2 - frame_width);
|
||||
default:
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user