mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-18 00:09:44 +00:00
PixelPaint: Use layer menu as context menu in LayerListWidget
This enables the layer menu as a context menu in LayerListWidget, setting the clicked layer as active for now, but in the future it would be nice to have custom menu applying to the clicked layer instead of the active layer.
This commit is contained in:
parent
9df3550e58
commit
8d205ae62e
Notes:
sideshowbarker
2024-07-18 10:21:11 +09:00
Author: https://github.com/metmo
Commit: 8d205ae62e
Pull-request: https://github.com/SerenityOS/serenity/pull/8365
3 changed files with 20 additions and 0 deletions
|
@ -405,6 +405,10 @@ int main(int argc, char** argv)
|
|||
},
|
||||
window));
|
||||
|
||||
layer_list_widget.on_context_menu_request = [&](auto& event) {
|
||||
layer_menu.popup(event.screen_position());
|
||||
};
|
||||
|
||||
auto& filter_menu = menubar->add_menu("&Filter");
|
||||
auto& spatial_filters_menu = filter_menu.add_submenu("&Spatial");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue