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:
Marcus Nilsson 2021-07-01 15:04:04 +02:00 committed by Andreas Kling
commit 8d205ae62e
Notes: sideshowbarker 2024-07-18 10:21:11 +09:00
3 changed files with 20 additions and 0 deletions

View file

@ -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");