diff options
author | electrikmilk <brandonjordan124@gmail.com> | 2022-02-12 19:08:48 -0500 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-13 10:18:37 +0100 |
commit | 8c32b42bdfe9dba55b97733dfd42dd121e42fec5 (patch) | |
tree | a8c1ff94d92c1ab2e555824344da0fd8e3df4097 | |
parent | dc5675ef2206c0a8e992652c06cb27ec1dcb3b1e (diff) | |
download | serenity-8c32b42bdfe9dba55b97733dfd42dd121e42fec5.zip |
Base+PixelPaint: Add more icons
25 files changed, 21 insertions, 7 deletions
diff --git a/Base/res/icons/16x16/bottom-layer.png b/Base/res/icons/16x16/bottom-layer.png Binary files differindex f8b540b48e..bcd05b1228 100644 --- a/Base/res/icons/16x16/bottom-layer.png +++ b/Base/res/icons/16x16/bottom-layer.png diff --git a/Base/res/icons/16x16/move-to-back.png b/Base/res/icons/16x16/move-to-back.png Binary files differindex a7556652f3..d2a8998ba3 100644 --- a/Base/res/icons/16x16/move-to-back.png +++ b/Base/res/icons/16x16/move-to-back.png diff --git a/Base/res/icons/16x16/move-to-front.png b/Base/res/icons/16x16/move-to-front.png Binary files differindex 17e33bbf0c..d49f071deb 100644 --- a/Base/res/icons/16x16/move-to-front.png +++ b/Base/res/icons/16x16/move-to-front.png diff --git a/Base/res/icons/16x16/new-layer.png b/Base/res/icons/16x16/new-layer.png Binary files differindex f96544ba74..9b3b758a1f 100644 --- a/Base/res/icons/16x16/new-layer.png +++ b/Base/res/icons/16x16/new-layer.png diff --git a/Base/res/icons/16x16/top-layer.png b/Base/res/icons/16x16/top-layer.png Binary files differindex 50b7dfd942..84b8fd318d 100644 --- a/Base/res/icons/16x16/top-layer.png +++ b/Base/res/icons/16x16/top-layer.png diff --git a/Base/res/icons/16x16/zoom-reset.png b/Base/res/icons/16x16/zoom-reset.png Binary files differindex 41455ff5da..d0b3ca85dc 100644 --- a/Base/res/icons/16x16/zoom-reset.png +++ b/Base/res/icons/16x16/zoom-reset.png diff --git a/Base/res/icons/pixelpaint/active-layer-down.png b/Base/res/icons/pixelpaint/active-layer-down.png Binary files differindex 01d2de7b2a..9d37c2621f 100644 --- a/Base/res/icons/pixelpaint/active-layer-down.png +++ b/Base/res/icons/pixelpaint/active-layer-down.png diff --git a/Base/res/icons/pixelpaint/active-layer-up.png b/Base/res/icons/pixelpaint/active-layer-up.png Binary files differindex 8edb7689b5..5caf3bfeb8 100644 --- a/Base/res/icons/pixelpaint/active-layer-up.png +++ b/Base/res/icons/pixelpaint/active-layer-up.png diff --git a/Base/res/icons/pixelpaint/add-guide.png b/Base/res/icons/pixelpaint/add-guide.png Binary files differnew file mode 100644 index 0000000000..c120416c48 --- /dev/null +++ b/Base/res/icons/pixelpaint/add-guide.png diff --git a/Base/res/icons/pixelpaint/clear-guides.png b/Base/res/icons/pixelpaint/clear-guides.png Binary files differnew file mode 100644 index 0000000000..e4ac353fb5 --- /dev/null +++ b/Base/res/icons/pixelpaint/clear-guides.png diff --git a/Base/res/icons/pixelpaint/close-image.png b/Base/res/icons/pixelpaint/close-image.png Binary files differnew file mode 100644 index 0000000000..ab65d0f6e6 --- /dev/null +++ b/Base/res/icons/pixelpaint/close-image.png diff --git a/Base/res/icons/pixelpaint/crop.png b/Base/res/icons/pixelpaint/crop.png Binary files differnew file mode 100644 index 0000000000..9e62d16e90 --- /dev/null +++ b/Base/res/icons/pixelpaint/crop.png diff --git a/Base/res/icons/pixelpaint/default-colors.png b/Base/res/icons/pixelpaint/default-colors.png Binary files differindex 2a7cb72e3e..c421dfa3f2 100644 --- a/Base/res/icons/pixelpaint/default-colors.png +++ b/Base/res/icons/pixelpaint/default-colors.png diff --git a/Base/res/icons/pixelpaint/guides.png b/Base/res/icons/pixelpaint/guides.png Binary files differindex 9e62d16e90..a0f817444e 100644 --- a/Base/res/icons/pixelpaint/guides.png +++ b/Base/res/icons/pixelpaint/guides.png diff --git a/Base/res/icons/pixelpaint/load-color-palette.png b/Base/res/icons/pixelpaint/load-color-palette.png Binary files differnew file mode 100644 index 0000000000..8ab269ac7a --- /dev/null +++ b/Base/res/icons/pixelpaint/load-color-palette.png diff --git a/Base/res/icons/pixelpaint/merge-active-layer-down.png b/Base/res/icons/pixelpaint/merge-active-layer-down.png Binary files differnew file mode 100644 index 0000000000..f1b51a965f --- /dev/null +++ b/Base/res/icons/pixelpaint/merge-active-layer-down.png diff --git a/Base/res/icons/pixelpaint/merge-active-layer-up.png b/Base/res/icons/pixelpaint/merge-active-layer-up.png Binary files differnew file mode 100644 index 0000000000..5072a44b3a --- /dev/null +++ b/Base/res/icons/pixelpaint/merge-active-layer-up.png diff --git a/Base/res/icons/pixelpaint/merge-visible.png b/Base/res/icons/pixelpaint/merge-visible.png Binary files differnew file mode 100644 index 0000000000..f108bcb139 --- /dev/null +++ b/Base/res/icons/pixelpaint/merge-visible.png diff --git a/Base/res/icons/pixelpaint/next-layer.png b/Base/res/icons/pixelpaint/next-layer.png Binary files differindex 2f6dc0ed4a..608b8c15dd 100644 --- a/Base/res/icons/pixelpaint/next-layer.png +++ b/Base/res/icons/pixelpaint/next-layer.png diff --git a/Base/res/icons/pixelpaint/previous-layer.png b/Base/res/icons/pixelpaint/previous-layer.png Binary files differindex e57ab2fe9a..050e88bde9 100644 --- a/Base/res/icons/pixelpaint/previous-layer.png +++ b/Base/res/icons/pixelpaint/previous-layer.png diff --git a/Base/res/icons/pixelpaint/save-color-palette.png b/Base/res/icons/pixelpaint/save-color-palette.png Binary files differnew file mode 100644 index 0000000000..ca658ad84f --- /dev/null +++ b/Base/res/icons/pixelpaint/save-color-palette.png diff --git a/Base/res/icons/pixelpaint/swap-colors.png b/Base/res/icons/pixelpaint/swap-colors.png Binary files differindex 5f84a4fb71..e264ac3f57 100644 --- a/Base/res/icons/pixelpaint/swap-colors.png +++ b/Base/res/icons/pixelpaint/swap-colors.png diff --git a/Userland/Applications/PixelPaint/IconBag.cpp b/Userland/Applications/PixelPaint/IconBag.cpp index 88017b99e0..bbd1a2ab60 100644 --- a/Userland/Applications/PixelPaint/IconBag.cpp +++ b/Userland/Applications/PixelPaint/IconBag.cpp @@ -15,12 +15,18 @@ ErrorOr<IconBag> IconBag::try_create() icon_bag.filetype_pixelpaint = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/filetype-pixelpaint.png")); icon_bag.new_clipboard = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/new-clipboard.png")); icon_bag.file_export = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/file-export.png")); + icon_bag.close_image = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/close-tab.png")); icon_bag.edit_copy = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/edit-copy.png")); icon_bag.clear_selection = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/clear-selection.png")); icon_bag.swap_colors = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/swap-colors.png")); icon_bag.default_colors = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/default-colors.png")); + icon_bag.load_color_palette = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/load-color-palette.png")); + icon_bag.save_color_palette = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/save-color-palette.png")); + icon_bag.add_guide = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/add-guide.png")); + icon_bag.clear_guides = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/clear-guides.png")); icon_bag.edit_flip_vertical = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/edit-flip-vertical.png")); icon_bag.edit_flip_horizontal = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/edit-flip-horizontal.png")); + icon_bag.crop = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/crop.png")); icon_bag.new_layer = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/new-layer.png")); icon_bag.previous_layer = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/previous-layer.png")); icon_bag.next_layer = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/next-layer.png")); @@ -29,6 +35,7 @@ ErrorOr<IconBag> IconBag::try_create() icon_bag.active_layer_up = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/active-layer-up.png")); icon_bag.active_layer_down = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/active-layer-down.png")); icon_bag.delete_layer = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/delete.png")); + icon_bag.merge_visible = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/merge-visible.png")); icon_bag.filter = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/filter.png")); return icon_bag; diff --git a/Userland/Applications/PixelPaint/IconBag.h b/Userland/Applications/PixelPaint/IconBag.h index eab3879073..0eaf124422 100644 --- a/Userland/Applications/PixelPaint/IconBag.h +++ b/Userland/Applications/PixelPaint/IconBag.h @@ -16,12 +16,18 @@ struct IconBag final { RefPtr<Gfx::Bitmap> filetype_pixelpaint { nullptr }; RefPtr<Gfx::Bitmap> new_clipboard { nullptr }; RefPtr<Gfx::Bitmap> file_export { nullptr }; + RefPtr<Gfx::Bitmap> close_image { nullptr }; RefPtr<Gfx::Bitmap> edit_copy { nullptr }; RefPtr<Gfx::Bitmap> clear_selection { nullptr }; RefPtr<Gfx::Bitmap> swap_colors { nullptr }; RefPtr<Gfx::Bitmap> default_colors { nullptr }; + RefPtr<Gfx::Bitmap> load_color_palette { nullptr }; + RefPtr<Gfx::Bitmap> save_color_palette { nullptr }; + RefPtr<Gfx::Bitmap> add_guide { nullptr }; + RefPtr<Gfx::Bitmap> clear_guides { nullptr }; RefPtr<Gfx::Bitmap> edit_flip_vertical { nullptr }; RefPtr<Gfx::Bitmap> edit_flip_horizontal { nullptr }; + RefPtr<Gfx::Bitmap> crop { nullptr }; RefPtr<Gfx::Bitmap> new_layer { nullptr }; RefPtr<Gfx::Bitmap> previous_layer { nullptr }; RefPtr<Gfx::Bitmap> next_layer { nullptr }; @@ -30,6 +36,7 @@ struct IconBag final { RefPtr<Gfx::Bitmap> active_layer_up { nullptr }; RefPtr<Gfx::Bitmap> active_layer_down { nullptr }; RefPtr<Gfx::Bitmap> delete_layer { nullptr }; + RefPtr<Gfx::Bitmap> merge_visible { nullptr }; RefPtr<Gfx::Bitmap> filter { nullptr }; }; } diff --git a/Userland/Applications/PixelPaint/MainWidget.cpp b/Userland/Applications/PixelPaint/MainWidget.cpp index d1509c0326..e1c99f85ec 100644 --- a/Userland/Applications/PixelPaint/MainWidget.cpp +++ b/Userland/Applications/PixelPaint/MainWidget.cpp @@ -191,7 +191,7 @@ void MainWidget::initialize_menubar(GUI::Window& window) file_menu.add_separator(); - m_close_image_action = GUI::Action::create("&Close Image", { Mod_Ctrl, Key_W }, [&](auto&) { + m_close_image_action = GUI::Action::create("&Close Image", { Mod_Ctrl, Key_W }, g_icon_bag.close_image, [&](auto&) { auto* active_widget = m_tab_widget->active_widget(); VERIFY(active_widget); m_tab_widget->on_tab_close_click(*active_widget); @@ -305,7 +305,7 @@ void MainWidget::initialize_menubar(GUI::Window& window) editor->set_secondary_color(Color::White); })); m_edit_menu->add_action(GUI::Action::create( - "&Load Color Palette", [&](auto&) { + "&Load Color Palette", g_icon_bag.load_color_palette, [&](auto&) { auto response = FileSystemAccessClient::Client::the().try_open_file(&window, "Load Color Palette"); if (response.is_error()) return; @@ -319,7 +319,7 @@ void MainWidget::initialize_menubar(GUI::Window& window) m_palette_widget->display_color_list(result.value()); })); m_edit_menu->add_action(GUI::Action::create( - "Sa&ve Color Palette", [&](auto&) { + "Sa&ve Color Palette", g_icon_bag.save_color_palette, [&](auto&) { auto response = FileSystemAccessClient::Client::the().try_save_file(&window, "untitled", "palette"); if (response.is_error()) return; @@ -352,7 +352,7 @@ void MainWidget::initialize_menubar(GUI::Window& window) }); m_add_guide_action = GUI::Action::create( - "&Add Guide", [&](auto&) { + "&Add Guide", g_icon_bag.add_guide, [&](auto&) { auto dialog = PixelPaint::EditGuideDialog::construct(&window); if (dialog->exec() != GUI::Dialog::ExecOK) return; @@ -388,7 +388,7 @@ void MainWidget::initialize_menubar(GUI::Window& window) m_view_menu->add_action(*m_show_guides_action); m_view_menu->add_action(GUI::Action::create( - "&Clear Guides", [&](auto&) { + "&Clear Guides", g_icon_bag.clear_guides, [&](auto&) { auto* editor = current_image_editor(); VERIFY(editor); editor->clear_guides(); @@ -462,7 +462,7 @@ void MainWidget::initialize_menubar(GUI::Window& window) })); m_image_menu->add_separator(); m_image_menu->add_action(GUI::Action::create( - "&Crop To Selection", [&](auto&) { + "&Crop To Selection", g_icon_bag.crop, [&](auto&) { auto* editor = current_image_editor(); VERIFY(editor); // FIXME: disable this action if there is no selection @@ -584,7 +584,7 @@ void MainWidget::initialize_menubar(GUI::Window& window) })); m_layer_menu->add_action(GUI::Action::create( - "&Merge Visible", { Mod_Ctrl, Key_M }, [&](auto&) { + "&Merge Visible", { Mod_Ctrl, Key_M }, g_icon_bag.merge_visible, [&](auto&) { auto* editor = current_image_editor(); VERIFY(editor); editor->image().merge_visible_layers(); |