From 4321a7def1f0231de70deb1ed9fe3ef8d9340d45 Mon Sep 17 00:00:00 2001 From: Brandon Jordan Date: Sun, 1 Jan 2023 18:29:50 -0500 Subject: [PATCH] Base+Userland: Add menu item icons Base+Userland: Add menu item icons This adds missing icons to Presenter Presentation menu. This adds missing icon to Image Viewer View menu. This adds a scale icon for the Image Viewer and Font Editor. This moves the Fit Image to View icon to the 16x16 folder as it's now used by Image Viewer and not only Pixel Paint. This improves the fullscreen and play icons so that they fit together better. --- .../fit-image-to-view.png | Bin Base/res/icons/16x16/fullscreen.png | Bin 3016 -> 200 bytes Base/res/icons/16x16/play.png | Bin 5227 -> 153 bytes Base/res/icons/16x16/scale.png | Bin 0 -> 146 bytes .../Applications/FontEditor/MainWidget.cpp | 1 + Userland/Applications/ImageViewer/main.cpp | 3 ++- Userland/Applications/PixelPaint/IconBag.cpp | 2 +- .../Applications/Presenter/PresenterWidget.cpp | 8 ++++---- 8 files changed, 8 insertions(+), 6 deletions(-) rename Base/res/icons/{pixelpaint => 16x16}/fit-image-to-view.png (100%) create mode 100644 Base/res/icons/16x16/scale.png diff --git a/Base/res/icons/pixelpaint/fit-image-to-view.png b/Base/res/icons/16x16/fit-image-to-view.png similarity index 100% rename from Base/res/icons/pixelpaint/fit-image-to-view.png rename to Base/res/icons/16x16/fit-image-to-view.png diff --git a/Base/res/icons/16x16/fullscreen.png b/Base/res/icons/16x16/fullscreen.png index 6d73e89b5a0bf29e19b62a9977ac4537df595d14..1a26e81fc9141d56797c757e5b7b87e3f23684be 100644 GIT binary patch delta 172 zcmX>heu8m=N`1eli(^Q|t>h2!Pru2_8b4r&xZ3rK`@g>JoZtUXK0jVzsw~YE#C?hR z61RDSg!2T`#S#uZiZ@IS^D<~2NaqNfy|5}Er%|#=Zia!~rnET>?@W}AvMU~#I)g*i zXvzh)izoiEZk+hkz~o`KR!tz!vP8ebOC{$k7BF*U9(yem!KA3FHF1F?lR3jQ4-Qqa el2V1e3@O@554ydRa~K#H7(8A5T-G@yGyw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Q^E_Q_l|c4erQ|1PrdWZQX$D4VX2!-Qx(2D{ zmbxaEmZrLvrin?qMoDRjhG}W3hNelTNJe?)6_+IDC8vUns>m(S%gju%GB-A}G)y)z z)ip3SH_Q)fSos%arskC-g3_t2k|9{UBDcWGxhOTU zB)=#mKR?G-3FH6;BRxX{aPn5LfkcW&W^qY=QKcO?MT7HAaB3lh2gw3CnP4de1#q&p zN=$}WQk+F~p?c9qA5?I`BGpD8BibPfkV-l`E(M5Kkc*og zmyJHSxCIrx&@cm)eKf?-mEkDFjGTJes2&GHu27Kv1XD)78&qol`;+05v_b`~Uy| diff --git a/Base/res/icons/16x16/scale.png b/Base/res/icons/16x16/scale.png new file mode 100644 index 0000000000000000000000000000000000000000..0bd55262884ec50960bf33e1771134c09fd715d4 GIT binary patch literal 146 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7B0XIkLn>}1CoB;E5dZX> zyzJ!E6O+&P|DP^*?yvqT{Xg?_&ZX_EXYj z@)Q5AMO@EPRvj}w`A;p{_zXit$V8dcDNGDpp%XI`S^4iXFfcH9y85}Sb4q9e02Jvp AZ~y=R literal 0 HcmV?d00001 diff --git a/Userland/Applications/FontEditor/MainWidget.cpp b/Userland/Applications/FontEditor/MainWidget.cpp index 9de62b3ad0..285fec9fb1 100644 --- a/Userland/Applications/FontEditor/MainWidget.cpp +++ b/Userland/Applications/FontEditor/MainWidget.cpp @@ -709,6 +709,7 @@ ErrorOr MainWidget::initialize_menubar(GUI::Window& window) TRY(view_menu->try_add_action(*m_show_system_emoji_action)); TRY(view_menu->try_add_separator()); auto scale_menu = TRY(view_menu->try_add_submenu("&Scale")); + scale_menu->set_icon(TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/scale.png"sv))); TRY(scale_menu->try_add_action(*m_scale_five_action)); TRY(scale_menu->try_add_action(*m_scale_ten_action)); TRY(scale_menu->try_add_action(*m_scale_fifteen_action)); diff --git a/Userland/Applications/ImageViewer/main.cpp b/Userland/Applications/ImageViewer/main.cpp index ffa3e6493e..e0feaa703f 100644 --- a/Userland/Applications/ImageViewer/main.cpp +++ b/Userland/Applications/ImageViewer/main.cpp @@ -215,7 +215,7 @@ ErrorOr serenity_main(Main::Arguments arguments) window); auto fit_image_to_view_action = GUI::Action::create( - "Fit Image To &View", [&](auto&) { + "Fit Image To &View", TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/fit-image-to-view.png"sv)), [&](auto&) { widget->fit_content_to_view(); }); @@ -314,6 +314,7 @@ ErrorOr 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))); auto scaling_mode_group = make(); scaling_mode_group->set_exclusive(true); diff --git a/Userland/Applications/PixelPaint/IconBag.cpp b/Userland/Applications/PixelPaint/IconBag.cpp index 48973cede7..2393979915 100644 --- a/Userland/Applications/PixelPaint/IconBag.cpp +++ b/Userland/Applications/PixelPaint/IconBag.cpp @@ -23,7 +23,7 @@ ErrorOr IconBag::try_create() icon_bag.default_colors = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/default-colors.png"sv)); icon_bag.load_color_palette = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/load-color-palette.png"sv)); icon_bag.save_color_palette = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/save-color-palette.png"sv)); - icon_bag.fit_image_to_view = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/fit-image-to-view.png"sv)); + icon_bag.fit_image_to_view = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/fit-image-to-view.png"sv)); icon_bag.add_guide = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/add-guide.png"sv)); icon_bag.clear_guides = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/clear-guides.png"sv)); icon_bag.edit_flip_vertical = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/edit-flip-vertical.png"sv)); diff --git a/Userland/Applications/Presenter/PresenterWidget.cpp b/Userland/Applications/Presenter/PresenterWidget.cpp index bfd0b8101c..35ef191a99 100644 --- a/Userland/Applications/Presenter/PresenterWidget.cpp +++ b/Userland/Applications/Presenter/PresenterWidget.cpp @@ -41,14 +41,14 @@ ErrorOr PresenterWidget::initialize_menubar() TRY(file_menu.try_add_action(about_action)); auto& presentation_menu = window->add_menu("&Presentation"); - auto next_slide_action = GUI::Action::create("&Next", { KeyCode::Key_Right }, [this](auto&) { + auto next_slide_action = GUI::Action::create("&Next", { KeyCode::Key_Right }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/go-forward.png"sv)), [this](auto&) { if (m_current_presentation) { m_current_presentation->next_frame(); outln("Switched forward to slide {} frame {}", m_current_presentation->current_slide_number(), m_current_presentation->current_frame_in_slide_number()); update(); } }); - auto previous_slide_action = GUI::Action::create("&Previous", { KeyCode::Key_Left }, [this](auto&) { + auto previous_slide_action = GUI::Action::create("&Previous", { KeyCode::Key_Left }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/go-back.png"sv)), [this](auto&) { if (m_current_presentation) { m_current_presentation->previous_frame(); outln("Switched backward to slide {} frame {}", m_current_presentation->current_slide_number(), m_current_presentation->current_frame_in_slide_number()); @@ -60,10 +60,10 @@ ErrorOr PresenterWidget::initialize_menubar() m_next_slide_action = next_slide_action; m_previous_slide_action = previous_slide_action; - TRY(presentation_menu.try_add_action(GUI::Action::create("&Full Screen", { KeyModifier::Mod_Shift, KeyCode::Key_F5 }, { KeyCode::Key_F11 }, [this](auto&) { + TRY(presentation_menu.try_add_action(GUI::Action::create("&Full Screen", { KeyModifier::Mod_Shift, KeyCode::Key_F5 }, { KeyCode::Key_F11 }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/fullscreen.png"sv)), [this](auto&) { this->window()->set_fullscreen(true); }))); - TRY(presentation_menu.try_add_action(GUI::Action::create("Present From First &Slide", { KeyCode::Key_F5 }, [this](auto&) { + TRY(presentation_menu.try_add_action(GUI::Action::create("Present From First &Slide", { KeyCode::Key_F5 }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/play.png"sv)), [this](auto&) { if (m_current_presentation) m_current_presentation->go_to_first_slide(); this->window()->set_fullscreen(true);