mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-13 03:29:49 +00:00
Meta+Applications: Make clang-format-10 clean
This commit is contained in:
parent
8940bc3503
commit
9ef1461ec9
Notes:
sideshowbarker
2024-07-19 02:14:59 +09:00
Author: https://github.com/BenWiederhake
Commit: 9ef1461ec9
Pull-request: https://github.com/SerenityOS/serenity/pull/3541
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/linusg
27 changed files with 57 additions and 51 deletions
|
@ -108,22 +108,28 @@ void MoveTool::on_context_menu(Layer& layer, GUI::ContextMenuEvent& event)
|
|||
{
|
||||
if (!m_context_menu) {
|
||||
m_context_menu = GUI::Menu::construct();
|
||||
m_context_menu->add_action(GUI::CommonActions::make_move_to_front_action([this](auto&) {
|
||||
m_editor->image()->move_layer_to_front(*m_context_menu_layer);
|
||||
m_editor->layers_did_change();
|
||||
}, m_editor));
|
||||
m_context_menu->add_action(GUI::CommonActions::make_move_to_back_action([this](auto&) {
|
||||
m_editor->image()->move_layer_to_back(*m_context_menu_layer);
|
||||
m_editor->layers_did_change();
|
||||
}, m_editor));
|
||||
m_context_menu->add_action(GUI::CommonActions::make_move_to_front_action(
|
||||
[this](auto&) {
|
||||
m_editor->image()->move_layer_to_front(*m_context_menu_layer);
|
||||
m_editor->layers_did_change();
|
||||
},
|
||||
m_editor));
|
||||
m_context_menu->add_action(GUI::CommonActions::make_move_to_back_action(
|
||||
[this](auto&) {
|
||||
m_editor->image()->move_layer_to_back(*m_context_menu_layer);
|
||||
m_editor->layers_did_change();
|
||||
},
|
||||
m_editor));
|
||||
m_context_menu->add_separator();
|
||||
m_context_menu->add_action(GUI::Action::create("Delete layer", Gfx::Bitmap::load_from_file("/res/icons/16x16/delete.png"), [this](auto&) {
|
||||
m_editor->image()->remove_layer(*m_context_menu_layer);
|
||||
// FIXME: This should not be done imperatively here. Perhaps a Image::Client interface that ImageEditor can implement?
|
||||
if (m_editor->active_layer() == m_context_menu_layer)
|
||||
m_editor->set_active_layer(nullptr);
|
||||
m_editor->layers_did_change();
|
||||
}, m_editor));
|
||||
m_context_menu->add_action(GUI::Action::create(
|
||||
"Delete layer", Gfx::Bitmap::load_from_file("/res/icons/16x16/delete.png"), [this](auto&) {
|
||||
m_editor->image()->remove_layer(*m_context_menu_layer);
|
||||
// FIXME: This should not be done imperatively here. Perhaps a Image::Client interface that ImageEditor can implement?
|
||||
if (m_editor->active_layer() == m_context_menu_layer)
|
||||
m_editor->set_active_layer(nullptr);
|
||||
m_editor->layers_did_change();
|
||||
},
|
||||
m_editor));
|
||||
}
|
||||
m_context_menu_layer = layer;
|
||||
m_context_menu->popup(event.screen_position());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue