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

LibGfx: Remove try_ prefix from bitmap creation functions

Those don't have any non-try counterpart, so we might as well just omit
it.
This commit is contained in:
Tim Schumacher 2023-01-20 20:06:05 +01:00 committed by Linus Groh
parent 1971bff314
commit 82a152b696
186 changed files with 598 additions and 598 deletions

View file

@ -44,14 +44,14 @@ ErrorOr<NonnullRefPtr<TimeZoneSettingsWidget>> TimeZoneSettingsWidget::create()
{
auto timezonesettings_widget = TRY(adopt_nonnull_ref_or_enomem(new (nothrow) TimeZoneSettingsWidget));
auto time_zone_map_bitmap = TRY(Gfx::Bitmap::try_load_from_file("/res/graphics/map.png"sv));
auto time_zone_map_bitmap = TRY(Gfx::Bitmap::load_from_file("/res/graphics/map.png"sv));
auto time_zone_rect = time_zone_map_bitmap->rect().shrunken(TIME_ZONE_MAP_NORTHERN_TRIM, 0, TIME_ZONE_MAP_SOUTHERN_TRIM, 0);
time_zone_map_bitmap = TRY(time_zone_map_bitmap->cropped(time_zone_rect));
timezonesettings_widget->m_time_zone_map = *timezonesettings_widget->find_descendant_of_type_named<GUI::ImageWidget>("time_zone_map");
timezonesettings_widget->m_time_zone_map->set_bitmap(time_zone_map_bitmap);
auto time_zone_marker = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/32x32/ladyball.png"sv));
auto time_zone_marker = TRY(Gfx::Bitmap::load_from_file("/res/icons/32x32/ladyball.png"sv));
timezonesettings_widget->m_time_zone_marker = TRY(time_zone_marker->scaled(0.75f, 0.75f));
timezonesettings_widget->set_time_zone_location();