mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:37:46 +00:00
LibGfx: Use "try_" prefix for static factory functions
Also mark them as [[nodiscard]].
This commit is contained in:
parent
f0409081f5
commit
c7d891765c
131 changed files with 422 additions and 421 deletions
|
@ -72,7 +72,7 @@ int main(int argc, char** argv)
|
|||
container.layout()->add_spacer();
|
||||
|
||||
auto& flag_image = container.add<GUI::Label>();
|
||||
flag_image.set_icon(Gfx::Bitmap::load_from_file("/res/icons/minesweeper/flag.png"));
|
||||
flag_image.set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/minesweeper/flag.png"));
|
||||
flag_image.set_fixed_width(16);
|
||||
|
||||
auto& flag_label = container.add<GUI::Label>();
|
||||
|
@ -90,7 +90,7 @@ int main(int argc, char** argv)
|
|||
|
||||
auto& time_image = container.add<GUI::Label>();
|
||||
time_image.set_fixed_width(16);
|
||||
time_image.set_icon(Gfx::Bitmap::load_from_file("/res/icons/minesweeper/timer.png"));
|
||||
time_image.set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/minesweeper/timer.png"));
|
||||
|
||||
auto& time_label = container.add<GUI::Label>();
|
||||
time_label.set_autosize(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue