mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-05 17:16:04 +00:00
PixelPaint: Set Tool on_*_color_change logic using virtual functions
Previously, we were rewriting the on_primary_color_change in the Text Tool and Gradient, which made the palette widget no longer update after picking a color from an image. Additionally, it also crashed the program after leaving the Gradient tool and trying to change color.
This commit is contained in:
parent
cb96c892cc
commit
d27d19f012
Notes:
sideshowbarker
2024-07-17 09:48:50 +09:00
Author: https://github.com/krkk
Commit: d27d19f012
Pull-request: https://github.com/SerenityOS/serenity/pull/17467
7 changed files with 23 additions and 18 deletions
|
@ -37,7 +37,7 @@ public:
|
|||
virtual void on_mousedown(Layer*, MouseEvent&) override;
|
||||
virtual bool on_keydown(GUI::KeyEvent&) override;
|
||||
virtual void on_second_paint(Layer const*, GUI::PaintEvent&) override;
|
||||
virtual void on_tool_activation() override;
|
||||
virtual void on_primary_color_change(Color) override;
|
||||
virtual void on_tool_deactivation() override;
|
||||
virtual Variant<Gfx::StandardCursor, NonnullRefPtr<Gfx::Bitmap>> cursor() override;
|
||||
virtual GUI::Widget* get_properties_widget() override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue