mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 21:07:36 +00:00
PaintBrush: Shift key constrains LineTool angle
Holding Shift key will constrain the LineTool's line angle to 15 degrees increments. Many graphics editors have similar feature.
This commit is contained in:
parent
b185c7f58a
commit
413618454b
2 changed files with 37 additions and 1 deletions
|
@ -16,6 +16,7 @@ public:
|
|||
virtual void on_contextmenu(GContextMenuEvent&) override;
|
||||
virtual void on_second_paint(GPaintEvent&) override;
|
||||
virtual void on_keydown(GKeyEvent&) override;
|
||||
virtual void on_keyup(GKeyEvent&) override;
|
||||
|
||||
private:
|
||||
virtual const char* class_name() const override { return "LineTool"; }
|
||||
|
@ -25,4 +26,5 @@ private:
|
|||
Point m_line_end_position;
|
||||
RefPtr<GMenu> m_context_menu;
|
||||
int m_thickness { 1 };
|
||||
bool m_constrain_angle { false };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue