mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:57:45 +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:
parent
5497b7a718
commit
a47d576e94
1 changed files with 4 additions and 4 deletions
|
@ -764,12 +764,12 @@ Gfx::IntRect Window::tiled_rect(WindowTileType tiled) const
|
||||||
case WindowTileType::Top:
|
case WindowTileType::Top:
|
||||||
return Gfx::IntRect(0,
|
return Gfx::IntRect(0,
|
||||||
menu_height,
|
menu_height,
|
||||||
Screen::the().width() - frame_width,
|
Screen::the().width(),
|
||||||
(max_height - titlebar_height) / 2 - frame_width);
|
(max_height - titlebar_height) / 2 - frame_width);
|
||||||
case WindowTileType::Bottom:
|
case WindowTileType::Bottom:
|
||||||
return Gfx::IntRect(0,
|
return Gfx::IntRect(0,
|
||||||
menu_height + (titlebar_height + max_height) / 2 + frame_width,
|
menu_height + (titlebar_height + max_height) / 2 + frame_width,
|
||||||
Screen::the().width() - frame_width,
|
Screen::the().width(),
|
||||||
(max_height - titlebar_height) / 2 - frame_width);
|
(max_height - titlebar_height) / 2 - frame_width);
|
||||||
case WindowTileType::TopLeft:
|
case WindowTileType::TopLeft:
|
||||||
return Gfx::IntRect(0,
|
return Gfx::IntRect(0,
|
||||||
|
@ -785,12 +785,12 @@ Gfx::IntRect Window::tiled_rect(WindowTileType tiled) const
|
||||||
return Gfx::IntRect(0,
|
return Gfx::IntRect(0,
|
||||||
menu_height + (titlebar_height + max_height) / 2 + frame_width,
|
menu_height + (titlebar_height + max_height) / 2 + frame_width,
|
||||||
Screen::the().width() / 2 - frame_width,
|
Screen::the().width() / 2 - frame_width,
|
||||||
(max_height - titlebar_height) / 2);
|
(max_height - titlebar_height) / 2 - frame_width);
|
||||||
case WindowTileType::BottomRight:
|
case WindowTileType::BottomRight:
|
||||||
return Gfx::IntRect(Screen::the().width() / 2 + frame_width,
|
return Gfx::IntRect(Screen::the().width() / 2 + frame_width,
|
||||||
menu_height + (titlebar_height + max_height) / 2 + frame_width,
|
menu_height + (titlebar_height + max_height) / 2 + frame_width,
|
||||||
Screen::the().width() / 2 - frame_width,
|
Screen::the().width() / 2 - frame_width,
|
||||||
(max_height - titlebar_height) / 2);
|
(max_height - titlebar_height) / 2 - frame_width);
|
||||||
default:
|
default:
|
||||||
VERIFY_NOT_REACHED();
|
VERIFY_NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue