mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:57:43 +00:00
Userland: Use Rect::centered_within() where useful
This commit is contained in:
parent
43220568b0
commit
087bd7f767
9 changed files with 15 additions and 34 deletions
|
@ -173,8 +173,7 @@ void TaskbarWindow::update_applet_area()
|
|||
if (!main_widget())
|
||||
return;
|
||||
main_widget()->do_layout();
|
||||
Gfx::IntRect new_rect { {}, m_applet_area_size };
|
||||
new_rect.center_within(m_applet_area_container->screen_relative_rect());
|
||||
auto new_rect = Gfx::IntRect({}, m_applet_area_size).centered_within(m_applet_area_container->screen_relative_rect());
|
||||
GUI::WindowManagerServerConnection::the().async_set_applet_area_position(new_rect.location());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue