1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:47:46 +00:00

PixelPaint: Move properties for RectangleTool to ToolPropertiesWidget

Remove the context menu and move the options to the tool properties
widget.
This commit is contained in:
Marcus Nilsson 2021-08-02 22:51:12 +02:00 committed by Andreas Kling
parent 3392c66c94
commit 201b901cb1
2 changed files with 34 additions and 13 deletions

View file

@ -20,9 +20,9 @@ public:
virtual void on_mousedown(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& image_event) override;
virtual void on_mousemove(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& image_event) override;
virtual void on_mouseup(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& image_event) override;
virtual void on_tool_button_contextmenu(GUI::ContextMenuEvent&) override;
virtual void on_second_paint(Layer const&, GUI::PaintEvent&) override;
virtual void on_keydown(GUI::KeyEvent&) override;
virtual GUI::Widget* get_properties_widget() override;
private:
enum class Mode {
@ -33,10 +33,10 @@ private:
void draw_using(GUI::Painter&, Gfx::IntRect const&);
RefPtr<GUI::Widget> m_properties_widget;
GUI::MouseButton m_drawing_button { GUI::MouseButton::None };
Gfx::IntPoint m_rectangle_start_position;
Gfx::IntPoint m_rectangle_end_position;
RefPtr<GUI::Menu> m_context_menu;
Mode m_mode { Mode::Outline };
};