mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +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
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