1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:37:46 +00:00

Userland: Use Rect::centered_within() where useful

This commit is contained in:
Andreas Kling 2021-08-30 22:18:20 +02:00
parent 43220568b0
commit 087bd7f767
9 changed files with 15 additions and 34 deletions

View file

@ -75,8 +75,7 @@ PaletteWidget::PaletteWidget()
m_secondary_color_widget->set_fill_with_background_color(true);
m_primary_color_widget = add<GUI::Frame>();
Gfx::IntRect rect { 0, 0, 38, 15 };
rect.center_within(m_secondary_color_widget->relative_rect());
auto rect = Gfx::IntRect(0, 0, 38, 15).centered_within(m_secondary_color_widget->relative_rect());
m_primary_color_widget->set_relative_rect(rect);
m_primary_color_widget->set_fill_with_background_color(true);