1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-05 00:47:36 +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

@ -32,7 +32,7 @@ GitWidget::GitWidget()
unstaged_header.set_layout<GUI::HorizontalBoxLayout>();
auto& refresh_button = unstaged_header.add<GUI::Button>();
refresh_button.set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/reload.png"sv).release_value_but_fixme_should_propagate_errors());
refresh_button.set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/reload.png"sv).release_value_but_fixme_should_propagate_errors());
refresh_button.set_fixed_size(16, 16);
refresh_button.set_tooltip("refresh");
refresh_button.on_click = [this](int) { refresh(); };
@ -43,7 +43,7 @@ GitWidget::GitWidget()
unstaged_header.set_fixed_height(20);
m_unstaged_files = unstaged.add<GitFilesView>(
[this](auto const& file) { stage_file(file); },
Gfx::Bitmap::try_load_from_file("/res/icons/16x16/plus.png"sv).release_value_but_fixme_should_propagate_errors());
Gfx::Bitmap::load_from_file("/res/icons/16x16/plus.png"sv).release_value_but_fixme_should_propagate_errors());
m_unstaged_files->on_selection_change = [this] {
const auto& index = m_unstaged_files->selection().first();
if (!index.is_valid())
@ -60,7 +60,7 @@ GitWidget::GitWidget()
staged_header.set_layout<GUI::HorizontalBoxLayout>();
auto& commit_button = staged_header.add<GUI::Button>();
commit_button.set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/commit.png"sv).release_value_but_fixme_should_propagate_errors());
commit_button.set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/commit.png"sv).release_value_but_fixme_should_propagate_errors());
commit_button.set_fixed_size(16, 16);
commit_button.set_tooltip("commit");
commit_button.on_click = [this](int) { commit(); };
@ -71,7 +71,7 @@ GitWidget::GitWidget()
staged_header.set_fixed_height(20);
m_staged_files = staged.add<GitFilesView>(
[this](auto const& file) { unstage_file(file); },
Gfx::Bitmap::try_load_from_file("/res/icons/16x16/minus.png"sv).release_value_but_fixme_should_propagate_errors());
Gfx::Bitmap::load_from_file("/res/icons/16x16/minus.png"sv).release_value_but_fixme_should_propagate_errors());
}
bool GitWidget::initialize()