summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelectrikmilk <brandonjordan124@gmail.com>2022-02-14 23:51:05 -0500
committerAndreas Kling <kling@serenityos.org>2022-02-15 10:40:49 +0100
commit97ce19bc680b372f0ab690ede21d4e142b552ff0 (patch)
treefd670d7b222bd47b9792f0cb00e03142d5b8acb9
parent7e5b3ce26b96a68b271c0e5737a4dd80bbffdf0a (diff)
downloadserenity-97ce19bc680b372f0ab690ede21d4e142b552ff0.zip
Base+PixelPaint: Use Merge Active Layer Up/Down Icons
The icons for these actions were added in a previous commit but never used, now they are.
-rw-r--r--Userland/Applications/PixelPaint/IconBag.cpp2
-rw-r--r--Userland/Applications/PixelPaint/IconBag.h2
-rw-r--r--Userland/Applications/PixelPaint/MainWidget.cpp4
3 files changed, 6 insertions, 2 deletions
diff --git a/Userland/Applications/PixelPaint/IconBag.cpp b/Userland/Applications/PixelPaint/IconBag.cpp
index bbd1a2ab60..52ff362a6d 100644
--- a/Userland/Applications/PixelPaint/IconBag.cpp
+++ b/Userland/Applications/PixelPaint/IconBag.cpp
@@ -36,6 +36,8 @@ ErrorOr<IconBag> IconBag::try_create()
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.merge_active_layer_up = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/merge-active-layer-up.png"));
+ icon_bag.merge_active_layer_down = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/pixelpaint/merge-active-layer-down.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 0eaf124422..37327dff66 100644
--- a/Userland/Applications/PixelPaint/IconBag.h
+++ b/Userland/Applications/PixelPaint/IconBag.h
@@ -37,6 +37,8 @@ struct IconBag final {
RefPtr<Gfx::Bitmap> active_layer_down { nullptr };
RefPtr<Gfx::Bitmap> delete_layer { nullptr };
RefPtr<Gfx::Bitmap> merge_visible { nullptr };
+ RefPtr<Gfx::Bitmap> merge_active_layer_up { nullptr };
+ RefPtr<Gfx::Bitmap> merge_active_layer_down { nullptr };
RefPtr<Gfx::Bitmap> filter { nullptr };
};
}
diff --git a/Userland/Applications/PixelPaint/MainWidget.cpp b/Userland/Applications/PixelPaint/MainWidget.cpp
index 877c262856..f544db8286 100644
--- a/Userland/Applications/PixelPaint/MainWidget.cpp
+++ b/Userland/Applications/PixelPaint/MainWidget.cpp
@@ -592,7 +592,7 @@ void MainWidget::initialize_menubar(GUI::Window& window)
}));
m_layer_menu->add_action(GUI::Action::create(
- "Merge &Active Layer Up", [&](auto&) {
+ "Merge &Active Layer Up", g_icon_bag.merge_active_layer_up, [&](auto&) {
auto* editor = current_image_editor();
VERIFY(editor);
auto active_layer = editor->active_layer();
@@ -603,7 +603,7 @@ void MainWidget::initialize_menubar(GUI::Window& window)
}));
m_layer_menu->add_action(GUI::Action::create(
- "M&erge Active Layer Down", { Mod_Ctrl, Key_E }, [&](auto&) {
+ "M&erge Active Layer Down", { Mod_Ctrl, Key_E }, g_icon_bag.merge_active_layer_down, [&](auto&) {
auto* editor = current_image_editor();
VERIFY(editor);
auto active_layer = editor->active_layer();