mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 00:42:44 +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
				
			
		|  | @ -157,17 +157,17 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | |||
|         widget->rotate(Gfx::RotationDirection::Clockwise); | ||||
|     }); | ||||
| 
 | ||||
|     auto vertical_flip_action = GUI::Action::create("Flip &Vertically", { Mod_None, Key_V }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/edit-flip-vertical.png"sv)), | ||||
|     auto vertical_flip_action = GUI::Action::create("Flip &Vertically", { Mod_None, Key_V }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/edit-flip-vertical.png"sv)), | ||||
|         [&](auto&) { | ||||
|             widget->flip(Gfx::Orientation::Vertical); | ||||
|         }); | ||||
| 
 | ||||
|     auto horizontal_flip_action = GUI::Action::create("Flip &Horizontally", { Mod_None, Key_H }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/edit-flip-horizontal.png"sv)), | ||||
|     auto horizontal_flip_action = GUI::Action::create("Flip &Horizontally", { Mod_None, Key_H }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/edit-flip-horizontal.png"sv)), | ||||
|         [&](auto&) { | ||||
|             widget->flip(Gfx::Orientation::Horizontal); | ||||
|         }); | ||||
| 
 | ||||
|     auto desktop_wallpaper_action = GUI::Action::create("Set as Desktop &Wallpaper", TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/app-display-settings.png"sv)), | ||||
|     auto desktop_wallpaper_action = GUI::Action::create("Set as Desktop &Wallpaper", TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-display-settings.png"sv)), | ||||
|         [&](auto&) { | ||||
|             if (!GUI::Desktop::the().set_wallpaper(widget->bitmap(), widget->path())) { | ||||
|                 GUI::MessageBox::show(window, | ||||
|  | @ -177,22 +177,22 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | |||
|             } | ||||
|         }); | ||||
| 
 | ||||
|     auto go_first_action = GUI::Action::create("&Go to First", { Mod_None, Key_Home }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/go-first.png"sv)), | ||||
|     auto go_first_action = GUI::Action::create("&Go to First", { Mod_None, Key_Home }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/go-first.png"sv)), | ||||
|         [&](auto&) { | ||||
|             widget->navigate(ViewWidget::Directions::First); | ||||
|         }); | ||||
| 
 | ||||
|     auto go_back_action = GUI::Action::create("Go &Back", { Mod_None, Key_Left }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/go-back.png"sv)), | ||||
|     auto go_back_action = GUI::Action::create("Go &Back", { Mod_None, Key_Left }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/go-back.png"sv)), | ||||
|         [&](auto&) { | ||||
|             widget->navigate(ViewWidget::Directions::Back); | ||||
|         }); | ||||
| 
 | ||||
|     auto go_forward_action = GUI::Action::create("Go &Forward", { Mod_None, Key_Right }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/go-forward.png"sv)), | ||||
|     auto go_forward_action = GUI::Action::create("Go &Forward", { Mod_None, Key_Right }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/go-forward.png"sv)), | ||||
|         [&](auto&) { | ||||
|             widget->navigate(ViewWidget::Directions::Forward); | ||||
|         }); | ||||
| 
 | ||||
|     auto go_last_action = GUI::Action::create("Go to &Last", { Mod_None, Key_End }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/go-last.png"sv)), | ||||
|     auto go_last_action = GUI::Action::create("Go to &Last", { Mod_None, Key_End }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/go-last.png"sv)), | ||||
|         [&](auto&) { | ||||
|             widget->navigate(ViewWidget::Directions::Last); | ||||
|         }); | ||||
|  | @ -215,7 +215,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | |||
|         window); | ||||
| 
 | ||||
|     auto fit_image_to_view_action = GUI::Action::create( | ||||
|         "Fit Image To &View", TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/fit-image-to-view.png"sv)), [&](auto&) { | ||||
|         "Fit Image To &View", TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/fit-image-to-view.png"sv)), [&](auto&) { | ||||
|             widget->fit_content_to_view(); | ||||
|         }); | ||||
| 
 | ||||
|  | @ -314,7 +314,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | |||
|     TRY(view_menu->try_add_separator()); | ||||
| 
 | ||||
|     auto scaling_mode_menu = TRY(view_menu->try_add_submenu("&Scaling Mode")); | ||||
|     scaling_mode_menu->set_icon(TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/scale.png"sv))); | ||||
|     scaling_mode_menu->set_icon(TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/scale.png"sv))); | ||||
| 
 | ||||
|     auto scaling_mode_group = make<GUI::ActionGroup>(); | ||||
|     scaling_mode_group->set_exclusive(true); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tim Schumacher
						Tim Schumacher