1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 10:18:15 +09:00

LibGUI+VisualBuilder: Add move-to-front/back to GCommonActions

Also give them nice little icons. :^)
This commit is contained in:
Andreas Kling 2019-09-14 22:42:02 +02:00
parent 92b17eab23
commit d754ac5bcb
Notes: sideshowbarker 2024-07-19 12:06:28 +09:00
5 changed files with 14 additions and 2 deletions

View file

@ -27,11 +27,11 @@ VBForm::VBForm(const String& name, GWidget* parent)
set_greedy_for_hits(true);
m_context_menu = make<GMenu>();
m_context_menu->add_action(GAction::create("Move to front", [this](auto&) {
m_context_menu->add_action(GCommonActions::make_move_to_front_action([this](auto&) {
if (auto* widget = single_selected_widget())
widget->gwidget()->move_to_front();
}));
m_context_menu->add_action(GAction::create("Move to back", [this](auto&) {
m_context_menu->add_action(GCommonActions::make_move_to_back_action([this](auto&) {
if (auto* widget = single_selected_widget())
widget->gwidget()->move_to_back();
}));