mirror of
https://github.com/RGBCube/serenity
synced 2026-01-17 11:40:59 +00:00
Various applications were using the same slightly verbose code to center
themselves on the screen/desktop:
Gfx::IntRect window_rect { 0, 0, width, height };
window_rect.center_within(GUI::Desktop::the().rect());
window->set_rect(window_rect);
Which now becomes:
window->resize(width, height);
window->center_on_screen();
|
||
|---|---|---|
| .. | ||
| AudioServer | ||
| Clipboard | ||
| DHCPClient | ||
| ImageDecoder | ||
| LaunchServer | ||
| LookupServer | ||
| NotificationServer | ||
| ProtocolServer | ||
| SystemMenu | ||
| SystemServer | ||
| Taskbar | ||
| TelnetServer | ||
| WebContent | ||
| WebServer | ||
| WindowServer | ||
| CMakeLists.txt | ||