1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16:57:46 +00:00

PixelPaint: Move properties for EraserTool to ToolPropertiesWidget

Removes the context menu for EraserTool and instead use the
tool properties widget for options.
This commit is contained in:
Marcus Nilsson 2021-08-02 19:30:50 +02:00 committed by Andreas Kling
parent f58891ed42
commit e342bef854
2 changed files with 43 additions and 34 deletions

View file

@ -21,16 +21,15 @@ 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 GUI::Widget* get_properties_widget() override;
private:
Gfx::Color get_color() const;
Gfx::IntRect build_rect(Gfx::IntPoint const& pos, Gfx::IntRect const& widget_rect);
RefPtr<GUI::Menu> m_context_menu;
RefPtr<GUI::Widget> m_properties_widget;
bool m_use_secondary_color { false };
int m_thickness { 1 };
GUI::ActionGroup m_thickness_actions;
};
}