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:
parent
92b17eab23
commit
d754ac5bcb
Notes:
sideshowbarker
2024-07-19 12:06:28 +09:00
Author: https://github.com/awesomekling
Commit: d754ac5bcb
5 changed files with 14 additions and 2 deletions
|
@ -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();
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue