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

PixelPaint: Make Alt-Clicking with all tool act like the PickerTool

Refactored PickerTool functionality to the ImageEditor level and added a
flag to Tool Base Class to allow for tools to override Alt+Click
ColorPicker functionality
This commit is contained in:
Fausto Tommasi 2022-10-13 21:32:23 -05:00 committed by Linus Groh
parent 66c039c66f
commit 813ca5ebbe
6 changed files with 40 additions and 18 deletions

View file

@ -77,6 +77,9 @@ public:
virtual StringView tool_name() const = 0;
// We only set the override_alt_key flag to true since the override is false by default. If false is desired do not call method.
virtual bool is_overriding_alt() { return false; };
protected:
Tool() = default;
WeakPtr<ImageEditor> m_editor;