mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
Userland: Use Rect::centered_within() where useful
This commit is contained in:
parent
43220568b0
commit
087bd7f767
Notes:
sideshowbarker
2024-07-18 05:03:13 +09:00
Author: https://github.com/awesomekling
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