diff options
author | electrikmilk <brandonjordan124@gmail.com> | 2022-01-10 23:00:09 -0500 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-01-12 10:55:13 +0100 |
commit | 64ae8eac0e0d0476900e7ef4de3d15c78ce3152a (patch) | |
tree | 6879c49e90dc61d74295fbbcb3cdb1192449a373 | |
parent | 983c784a8049980a6de5fea16178f72e72c8c6f9 (diff) | |
download | serenity-64ae8eac0e0d0476900e7ef4de3d15c78ce3152a.zip |
Base+PixelPaint: Add more menu icons
Adding icons missing from Pixel Paint menus.
-rw-r--r-- | Base/res/icons/16x16/clear-selection.png | bin | 0 -> 3038 bytes | |||
-rw-r--r-- | Base/res/icons/16x16/file-export.png | bin | 0 -> 1486 bytes | |||
-rw-r--r-- | Base/res/icons/16x16/new-layer.png | bin | 5474 -> 4442 bytes | |||
-rw-r--r-- | Base/res/icons/pixelpaint/active-layer-down.png | bin | 0 -> 3407 bytes | |||
-rw-r--r-- | Base/res/icons/pixelpaint/active-layer-up.png | bin | 0 -> 3345 bytes | |||
-rw-r--r-- | Base/res/icons/pixelpaint/default-colors.png | bin | 0 -> 2989 bytes | |||
-rw-r--r-- | Base/res/icons/pixelpaint/next-layer.png | bin | 0 -> 3127 bytes | |||
-rw-r--r-- | Base/res/icons/pixelpaint/previous-layer.png | bin | 0 -> 2971 bytes | |||
-rw-r--r-- | Base/res/icons/pixelpaint/swap-colors.png | bin | 0 -> 2994 bytes | |||
-rw-r--r-- | Userland/Applications/PixelPaint/MainWidget.cpp | 24 |
10 files changed, 13 insertions, 11 deletions
diff --git a/Base/res/icons/16x16/clear-selection.png b/Base/res/icons/16x16/clear-selection.png Binary files differnew file mode 100644 index 0000000000..29b73dbbf1 --- /dev/null +++ b/Base/res/icons/16x16/clear-selection.png diff --git a/Base/res/icons/16x16/file-export.png b/Base/res/icons/16x16/file-export.png Binary files differnew file mode 100644 index 0000000000..771ffba83e --- /dev/null +++ b/Base/res/icons/16x16/file-export.png diff --git a/Base/res/icons/16x16/new-layer.png b/Base/res/icons/16x16/new-layer.png Binary files differindex 1262c2d9fd..f96544ba74 100644 --- a/Base/res/icons/16x16/new-layer.png +++ b/Base/res/icons/16x16/new-layer.png diff --git a/Base/res/icons/pixelpaint/active-layer-down.png b/Base/res/icons/pixelpaint/active-layer-down.png Binary files differnew file mode 100644 index 0000000000..01d2de7b2a --- /dev/null +++ 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 differnew file mode 100644 index 0000000000..8edb7689b5 --- /dev/null +++ b/Base/res/icons/pixelpaint/active-layer-up.png diff --git a/Base/res/icons/pixelpaint/default-colors.png b/Base/res/icons/pixelpaint/default-colors.png Binary files differnew file mode 100644 index 0000000000..2a7cb72e3e --- /dev/null +++ b/Base/res/icons/pixelpaint/default-colors.png diff --git a/Base/res/icons/pixelpaint/next-layer.png b/Base/res/icons/pixelpaint/next-layer.png Binary files differnew file mode 100644 index 0000000000..2f6dc0ed4a --- /dev/null +++ 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 differnew file mode 100644 index 0000000000..e57ab2fe9a --- /dev/null +++ b/Base/res/icons/pixelpaint/previous-layer.png diff --git a/Base/res/icons/pixelpaint/swap-colors.png b/Base/res/icons/pixelpaint/swap-colors.png Binary files differnew file mode 100644 index 0000000000..5f84a4fb71 --- /dev/null +++ b/Base/res/icons/pixelpaint/swap-colors.png diff --git a/Userland/Applications/PixelPaint/MainWidget.cpp b/Userland/Applications/PixelPaint/MainWidget.cpp index 194207c713..04a61a187f 100644 --- a/Userland/Applications/PixelPaint/MainWidget.cpp +++ b/Userland/Applications/PixelPaint/MainWidget.cpp @@ -106,7 +106,7 @@ void MainWidget::initialize_menubar(GUI::Window& window) auto& file_menu = window.add_menu("&File"); m_new_image_action = GUI::Action::create( - "&New Image...", { Mod_Ctrl, Key_N }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/new.png").release_value_but_fixme_should_propagate_errors(), [&](auto&) { + "&New Image...", { Mod_Ctrl, Key_N }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/filetype-pixelpaint.png").release_value_but_fixme_should_propagate_errors(), [&](auto&) { auto dialog = PixelPaint::CreateNewImageDialog::construct(&window); if (dialog->exec() == GUI::Dialog::ExecOK) { auto image = PixelPaint::Image::try_create_with_size(dialog->image_size()).release_value_but_fixme_should_propagate_errors(); @@ -185,6 +185,8 @@ void MainWidget::initialize_menubar(GUI::Window& window) GUI::MessageBox::show_error(&window, String::formatted("Export to PNG failed: {}", result.error())); })); + m_export_submenu->set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/file-export.png").release_value_but_fixme_should_propagate_errors()); + file_menu.add_separator(); m_close_image_action = GUI::Action::create("&Close Image", { Mod_Ctrl, Key_W }, [&](auto&) { @@ -279,7 +281,7 @@ void MainWidget::initialize_menubar(GUI::Window& window) editor->selection().merge(editor->active_layer()->relative_rect(), PixelPaint::Selection::MergeMode::Set); })); m_edit_menu->add_action(GUI::Action::create( - "Clear &Selection", { Mod_Ctrl | Mod_Shift, Key_A }, [&](auto&) { + "Clear &Selection", { Mod_Ctrl | Mod_Shift, Key_A }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/clear-selection.png").release_value_but_fixme_should_propagate_errors(), [&](auto&) { auto* editor = current_image_editor(); VERIFY(editor); editor->selection().clear(); @@ -287,7 +289,7 @@ void MainWidget::initialize_menubar(GUI::Window& window) m_edit_menu->add_separator(); m_edit_menu->add_action(GUI::Action::create( - "S&wap Colors", { Mod_None, Key_X }, [&](auto&) { + "S&wap Colors", { Mod_None, Key_X }, Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/swap-colors.png").release_value_but_fixme_should_propagate_errors(), [&](auto&) { auto* editor = current_image_editor(); VERIFY(editor); auto old_primary_color = editor->primary_color(); @@ -295,7 +297,7 @@ void MainWidget::initialize_menubar(GUI::Window& window) editor->set_secondary_color(old_primary_color); })); m_edit_menu->add_action(GUI::Action::create( - "&Default Colors", { Mod_None, Key_D }, [&](auto&) { + "&Default Colors", { Mod_None, Key_D }, Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/default-colors.png").release_value_but_fixme_should_propagate_errors(), [&](auto&) { auto* editor = current_image_editor(); VERIFY(editor); editor->set_primary_color(Color::Black); @@ -432,13 +434,13 @@ void MainWidget::initialize_menubar(GUI::Window& window) m_image_menu = window.add_menu("&Image"); m_image_menu->add_action(GUI::Action::create( - "Flip &Vertically", [&](auto&) { + "Flip &Vertically", Gfx::Bitmap::try_load_from_file("/res/icons/16x16/edit-flip-vertical.png").release_value_but_fixme_should_propagate_errors(), [&](auto&) { auto* editor = current_image_editor(); VERIFY(editor); editor->image().flip(Gfx::Orientation::Vertical); })); m_image_menu->add_action(GUI::Action::create( - "Flip &Horizontally", [&](auto&) { + "Flip &Horizontally", Gfx::Bitmap::try_load_from_file("/res/icons/16x16/edit-flip-horizontal.png").release_value_but_fixme_should_propagate_errors(), [&](auto&) { auto* editor = current_image_editor(); VERIFY(editor); editor->image().flip(Gfx::Orientation::Horizontal); @@ -491,11 +493,11 @@ void MainWidget::initialize_menubar(GUI::Window& window) m_layer_menu->add_separator(); m_layer_menu->add_action(GUI::Action::create( - "Select &Previous Layer", { 0, Key_PageUp }, [&](auto&) { + "Select &Previous Layer", { 0, Key_PageUp }, Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/previous-layer.png").release_value_but_fixme_should_propagate_errors(), [&](auto&) { m_layer_list_widget->cycle_through_selection(1); })); m_layer_menu->add_action(GUI::Action::create( - "Select &Next Layer", { 0, Key_PageDown }, [&](auto&) { + "Select &Next Layer", { 0, Key_PageDown }, Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/next-layer.png").release_value_but_fixme_should_propagate_errors(), [&](auto&) { m_layer_list_widget->cycle_through_selection(-1); })); m_layer_menu->add_action(GUI::Action::create( @@ -529,7 +531,7 @@ void MainWidget::initialize_menubar(GUI::Window& window) })); m_layer_menu->add_separator(); m_layer_menu->add_action(GUI::Action::create( - "Move Active Layer &Up", { Mod_Ctrl, Key_PageUp }, [&](auto&) { + "Move Active Layer &Up", { Mod_Ctrl, Key_PageUp }, Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/active-layer-up.png").release_value_but_fixme_should_propagate_errors(), [&](auto&) { auto* editor = current_image_editor(); VERIFY(editor); auto active_layer = editor->active_layer(); @@ -538,7 +540,7 @@ void MainWidget::initialize_menubar(GUI::Window& window) editor->image().move_layer_up(*active_layer); })); m_layer_menu->add_action(GUI::Action::create( - "Move Active Layer &Down", { Mod_Ctrl, Key_PageDown }, [&](auto&) { + "Move Active Layer &Down", { Mod_Ctrl, Key_PageDown }, Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/active-layer-down.png").release_value_but_fixme_should_propagate_errors(), [&](auto&) { auto* editor = current_image_editor(); VERIFY(editor); auto active_layer = editor->active_layer(); @@ -602,7 +604,7 @@ void MainWidget::initialize_menubar(GUI::Window& window) m_filter_menu = window.add_menu("&Filter"); - m_filter_menu->add_action(GUI::Action::create("Filter &Gallery", [&](auto&) { + m_filter_menu->add_action(GUI::Action::create("Filter &Gallery", Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/filter.png").release_value_but_fixme_should_propagate_errors(), [&](auto&) { auto* editor = current_image_editor(); VERIFY(editor); auto dialog = PixelPaint::FilterGallery::construct(&window, editor); |