diff options
author | Andreas Kling <kling@serenityos.org> | 2021-08-30 22:18:20 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-31 01:35:08 +0200 |
commit | 087bd7f767d706af2ac9357410b70bcb6db88b6d (patch) | |
tree | 1fe6f05bd1bbb28b4b7b1742b5fbedf8b1720bd3 /Userland/Services/Taskbar | |
parent | 43220568b058861d08450793c3269914392d250c (diff) | |
download | serenity-087bd7f767d706af2ac9357410b70bcb6db88b6d.zip |
Userland: Use Rect::centered_within() where useful
Diffstat (limited to 'Userland/Services/Taskbar')
-rw-r--r-- | Userland/Services/Taskbar/TaskbarWindow.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Userland/Services/Taskbar/TaskbarWindow.cpp b/Userland/Services/Taskbar/TaskbarWindow.cpp index 431de783e4..38a0417f3a 100644 --- a/Userland/Services/Taskbar/TaskbarWindow.cpp +++ b/Userland/Services/Taskbar/TaskbarWindow.cpp @@ -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()); } |