mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:57:43 +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:
parent
1971bff314
commit
82a152b696
186 changed files with 598 additions and 598 deletions
|
@ -31,7 +31,7 @@ static Gfx::Bitmap& default_window_icon()
|
|||
{
|
||||
static RefPtr<Gfx::Bitmap> s_icon;
|
||||
if (!s_icon)
|
||||
s_icon = Gfx::Bitmap::try_load_from_file(default_window_icon_path()).release_value_but_fixme_should_propagate_errors();
|
||||
s_icon = Gfx::Bitmap::load_from_file(default_window_icon_path()).release_value_but_fixme_should_propagate_errors();
|
||||
return *s_icon;
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ static Gfx::Bitmap& minimize_icon()
|
|||
{
|
||||
static RefPtr<Gfx::Bitmap> s_icon;
|
||||
if (!s_icon)
|
||||
s_icon = Gfx::Bitmap::try_load_from_file("/res/icons/16x16/downward-triangle.png"sv).release_value_but_fixme_should_propagate_errors();
|
||||
s_icon = Gfx::Bitmap::load_from_file("/res/icons/16x16/downward-triangle.png"sv).release_value_but_fixme_should_propagate_errors();
|
||||
return *s_icon;
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ static Gfx::Bitmap& maximize_icon()
|
|||
{
|
||||
static RefPtr<Gfx::Bitmap> s_icon;
|
||||
if (!s_icon)
|
||||
s_icon = Gfx::Bitmap::try_load_from_file("/res/icons/16x16/upward-triangle.png"sv).release_value_but_fixme_should_propagate_errors();
|
||||
s_icon = Gfx::Bitmap::load_from_file("/res/icons/16x16/upward-triangle.png"sv).release_value_but_fixme_should_propagate_errors();
|
||||
return *s_icon;
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ static Gfx::Bitmap& restore_icon()
|
|||
{
|
||||
static RefPtr<Gfx::Bitmap> s_icon;
|
||||
if (!s_icon)
|
||||
s_icon = Gfx::Bitmap::try_load_from_file("/res/icons/16x16/window-restore.png"sv).release_value_but_fixme_should_propagate_errors();
|
||||
s_icon = Gfx::Bitmap::load_from_file("/res/icons/16x16/window-restore.png"sv).release_value_but_fixme_should_propagate_errors();
|
||||
return *s_icon;
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ static Gfx::Bitmap& close_icon()
|
|||
{
|
||||
static RefPtr<Gfx::Bitmap> s_icon;
|
||||
if (!s_icon)
|
||||
s_icon = Gfx::Bitmap::try_load_from_file("/res/icons/16x16/window-close.png"sv).release_value_but_fixme_should_propagate_errors();
|
||||
s_icon = Gfx::Bitmap::load_from_file("/res/icons/16x16/window-close.png"sv).release_value_but_fixme_should_propagate_errors();
|
||||
return *s_icon;
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ static Gfx::Bitmap& pin_icon()
|
|||
{
|
||||
static RefPtr<Gfx::Bitmap> s_icon;
|
||||
if (!s_icon)
|
||||
s_icon = Gfx::Bitmap::try_load_from_file("/res/icons/16x16/window-pin.png"sv).release_value_but_fixme_should_propagate_errors();
|
||||
s_icon = Gfx::Bitmap::load_from_file("/res/icons/16x16/window-pin.png"sv).release_value_but_fixme_should_propagate_errors();
|
||||
return *s_icon;
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ static Gfx::Bitmap& move_icon()
|
|||
{
|
||||
static RefPtr<Gfx::Bitmap> s_icon;
|
||||
if (!s_icon)
|
||||
s_icon = Gfx::Bitmap::try_load_from_file("/res/icons/16x16/move.png"sv).release_value_but_fixme_should_propagate_errors();
|
||||
s_icon = Gfx::Bitmap::load_from_file("/res/icons/16x16/move.png"sv).release_value_but_fixme_should_propagate_errors();
|
||||
return *s_icon;
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ void Window::set_rect(Gfx::IntRect const& rect)
|
|||
m_backing_store = nullptr;
|
||||
} else if (is_internal() && (!m_backing_store || old_rect.size() != rect.size())) {
|
||||
auto format = has_alpha_channel() ? Gfx::BitmapFormat::BGRA8888 : Gfx::BitmapFormat::BGRx8888;
|
||||
m_backing_store = Gfx::Bitmap::try_create(format, m_rect.size()).release_value_but_fixme_should_propagate_errors();
|
||||
m_backing_store = Gfx::Bitmap::create(format, m_rect.size()).release_value_but_fixme_should_propagate_errors();
|
||||
m_backing_store_visible_size = m_rect.size();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue