mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:07:46 +00:00
LibGfx+Userland: Rename Size::scaled_by to Size::scaled
Ignoring Size for a second, we currently have: Rect::scale_by Rect::scaled Point::scale_by Point::scaled In Size, before this patch, we have: Size::scale_by Size::scaled_by This aligns Size to use the same method name as Rect and Point. While subjectively providing API symmetry, this is mostly to allow using this method in templated helpers without caring what the exact underlying type is.
This commit is contained in:
parent
f34cc0b8e3
commit
7c4b0b0389
4 changed files with 7 additions and 7 deletions
|
@ -126,7 +126,7 @@ void MonitorWidget::redraw_desktop_if_needed()
|
|||
float sw = (float)m_desktop_bitmap->width() / (float)m_desktop_resolution.width();
|
||||
float sh = (float)m_desktop_bitmap->height() / (float)m_desktop_resolution.height();
|
||||
|
||||
auto scaled_size = m_wallpaper_bitmap->size().to_type<float>().scaled_by(sw, sh).to_type<int>();
|
||||
auto scaled_size = m_wallpaper_bitmap->size().to_type<float>().scaled(sw, sh).to_type<int>();
|
||||
auto scaled_bitmap_or_error = m_wallpaper_bitmap->scaled(sw, sh);
|
||||
if (scaled_bitmap_or_error.is_error()) {
|
||||
GUI::MessageBox::show_error(window(), "There was an error updating the desktop preview"sv);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue