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

PixelPaint: Tool properties panel

Each tool can have its own set of properties that can be modified
through a panel on the right side.

The tools I've added properties for are:

Pen:
	Thickness

Brush:
	Size
	Hardness

Spray:
	Thickness
	Density

Bucket:
	Threshold
This commit is contained in:
BenJilks 2020-10-15 17:57:07 +00:00 committed by Andreas Kling
parent 544f2f3c96
commit afd52e2576
13 changed files with 324 additions and 12 deletions

View file

@ -42,16 +42,20 @@ public:
virtual void on_mouseup(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_tool_button_contextmenu(GUI::ContextMenuEvent&) override;
virtual GUI::Widget* get_properties_widget() override;
private:
virtual const char* class_name() const override { return "SprayTool"; }
void paint_it();
RefPtr<GUI::Widget> m_properties_widget;
RefPtr<Core::Timer> m_timer;
Gfx::IntPoint m_last_pos;
Color m_color;
RefPtr<GUI::Menu> m_context_menu;
GUI::ActionGroup m_thickness_actions;
int m_thickness { 1 };
int m_thickness { 10 };
int m_density { 40 };
};
}