diff options
author | Marcus Nilsson <brainbomb@gmail.com> | 2021-07-01 15:04:04 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-05 20:39:30 +0200 |
commit | 8d205ae62ee1637168efa19b1166e92071c9ac89 (patch) | |
tree | 6d734cafc35f5b6499372f98f5cc1ed922fe7c24 /Userland/Applications/PixelPaint/LayerListWidget.h | |
parent | 9df3550e5818e0426ff5391437b14fc6da131c9e (diff) | |
download | serenity-8d205ae62ee1637168efa19b1166e92071c9ac89.zip |
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.
Diffstat (limited to 'Userland/Applications/PixelPaint/LayerListWidget.h')
-rw-r--r-- | Userland/Applications/PixelPaint/LayerListWidget.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Applications/PixelPaint/LayerListWidget.h b/Userland/Applications/PixelPaint/LayerListWidget.h index 5a904d9c0a..e1d2008c95 100644 --- a/Userland/Applications/PixelPaint/LayerListWidget.h +++ b/Userland/Applications/PixelPaint/LayerListWidget.h @@ -23,6 +23,7 @@ public: void set_selected_layer(Layer*); Function<void(Layer*)> on_layer_select; + Function<void(GUI::ContextMenuEvent&)> on_context_menu_request; void select_bottom_layer(); void select_top_layer(); @@ -35,6 +36,7 @@ private: virtual void mousedown_event(GUI::MouseEvent&) override; virtual void mousemove_event(GUI::MouseEvent&) override; virtual void mouseup_event(GUI::MouseEvent&) override; + virtual void context_menu_event(GUI::ContextMenuEvent&) override; virtual void resize_event(GUI::ResizeEvent&) override; virtual void image_did_add_layer(size_t) override; |