1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:38:13 +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

@ -56,7 +56,7 @@ ClockWidget::ClockWidget()
m_prev_date = navigation_container.add<GUI::Button>();
m_prev_date->set_button_style(Gfx::ButtonStyle::Coolbar);
m_prev_date->set_fixed_size(24, 24);
m_prev_date->set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/go-back.png"sv).release_value_but_fixme_should_propagate_errors());
m_prev_date->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/go-back.png"sv).release_value_but_fixme_should_propagate_errors());
m_prev_date->on_click = [&](auto) {
unsigned view_month = m_calendar->view_month();
unsigned view_year = m_calendar->view_year();
@ -90,7 +90,7 @@ ClockWidget::ClockWidget()
m_next_date = navigation_container.add<GUI::Button>();
m_next_date->set_button_style(Gfx::ButtonStyle::Coolbar);
m_next_date->set_fixed_size(24, 24);
m_next_date->set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/go-forward.png"sv).release_value_but_fixme_should_propagate_errors());
m_next_date->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/go-forward.png"sv).release_value_but_fixme_should_propagate_errors());
m_next_date->on_click = [&](auto) {
unsigned view_month = m_calendar->view_month();
unsigned view_year = m_calendar->view_year();
@ -140,7 +140,7 @@ ClockWidget::ClockWidget()
m_jump_to_button = settings_container.add<GUI::Button>();
m_jump_to_button->set_button_style(Gfx::ButtonStyle::Coolbar);
m_jump_to_button->set_fixed_size(24, 24);
m_jump_to_button->set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/calendar-date.png"sv).release_value_but_fixme_should_propagate_errors());
m_jump_to_button->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/calendar-date.png"sv).release_value_but_fixme_should_propagate_errors());
m_jump_to_button->set_tooltip("Jump to today");
m_jump_to_button->on_click = [this](auto) {
jump_to_current_date();
@ -149,7 +149,7 @@ ClockWidget::ClockWidget()
m_calendar_launcher = settings_container.add<GUI::Button>();
m_calendar_launcher->set_button_style(Gfx::ButtonStyle::Coolbar);
m_calendar_launcher->set_fixed_size(24, 24);
m_calendar_launcher->set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/app-calendar.png"sv).release_value_but_fixme_should_propagate_errors());
m_calendar_launcher->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-calendar.png"sv).release_value_but_fixme_should_propagate_errors());
m_calendar_launcher->set_tooltip("Calendar");
m_calendar_launcher->on_click = [this](auto) {
GUI::Process::spawn_or_show_error(window(), "/bin/Calendar"sv);
@ -199,7 +199,7 @@ void ClockWidget::context_menu_event(GUI::ContextMenuEvent& event)
if (!m_context_menu) {
m_context_menu = GUI::Menu::construct();
auto settings_icon = MUST(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/settings.png"sv));
auto settings_icon = MUST(Gfx::Bitmap::load_from_file("/res/icons/16x16/settings.png"sv));
auto open_clock_settings_action = GUI::Action::create("Clock &Settings", *settings_icon, [this](auto&) {
GUI::Process::spawn_or_show_error(window(), "/bin/ClockSettings"sv, Array { "--open-tab", "clock" });
});