mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 17:40:27 +00:00
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.
This commit is contained in:
parent
7e5b3ce26b
commit
97ce19bc68
Notes:
sideshowbarker
2024-07-17 18:47:12 +09:00
Author: https://github.com/electrikmilk Commit: https://github.com/SerenityOS/serenity/commit/97ce19bc68 Pull-request: https://github.com/SerenityOS/serenity/pull/12541
3 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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 };
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue