mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:57:44 +00:00
PixelPaint: Remove context menu for MoveTool
Remove the context menu for MoveTool and move the actions to the layer menu instead.
This commit is contained in:
parent
15e9d0b4d8
commit
3392c66c94
3 changed files with 26 additions and 35 deletions
|
@ -369,6 +369,31 @@ int main(int argc, char** argv)
|
|||
},
|
||||
window));
|
||||
layer_menu.add_separator();
|
||||
layer_menu.add_action(GUI::CommonActions::make_move_to_front_action(
|
||||
[&](auto&) {
|
||||
auto* editor = current_image_editor();
|
||||
if (!editor)
|
||||
return;
|
||||
auto active_layer = editor->active_layer();
|
||||
if (!active_layer)
|
||||
return;
|
||||
editor->image().move_layer_to_front(*active_layer);
|
||||
editor->layers_did_change();
|
||||
},
|
||||
window));
|
||||
layer_menu.add_action(GUI::CommonActions::make_move_to_back_action(
|
||||
[&](auto&) {
|
||||
auto* editor = current_image_editor();
|
||||
if (!editor)
|
||||
return;
|
||||
auto active_layer = editor->active_layer();
|
||||
if (!active_layer)
|
||||
return;
|
||||
editor->image().move_layer_to_back(*active_layer);
|
||||
editor->layers_did_change();
|
||||
},
|
||||
window));
|
||||
layer_menu.add_separator();
|
||||
layer_menu.add_action(GUI::Action::create(
|
||||
"Move Active Layer &Up", { Mod_Ctrl, Key_PageUp }, [&](auto&) {
|
||||
auto* editor = current_image_editor();
|
||||
|
@ -393,7 +418,7 @@ int main(int argc, char** argv)
|
|||
window));
|
||||
layer_menu.add_separator();
|
||||
layer_menu.add_action(GUI::Action::create(
|
||||
"&Remove Active Layer", { Mod_Ctrl, Key_D }, [&](auto&) {
|
||||
"&Remove Active Layer", { Mod_Ctrl, Key_D }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/delete.png"), [&](auto&) {
|
||||
auto* editor = current_image_editor();
|
||||
if (!editor)
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue