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

PaintBrush: Allow canceling a line by pressing the Escape key

Sometimes you change your mind mid-line, and just want to get out of
the situation. You can now do that :^)
This commit is contained in:
Andreas Kling 2019-11-29 22:39:23 +01:00
parent 4e6cd541c9
commit b09ac26311
6 changed files with 21 additions and 1 deletions

View file

@ -1,7 +1,6 @@
#pragma once
#include "PaintableWidget.h"
class GMouseEvent;
class Tool {
public:
@ -14,6 +13,7 @@ public:
virtual void on_mouseup(GMouseEvent&) {}
virtual void on_contextmenu(GContextMenuEvent&) {}
virtual void on_second_paint(GPaintEvent&) {}
virtual void on_keydown(GKeyEvent&) {}
void clear() { m_widget = nullptr; }
void setup(PaintableWidget& widget) { m_widget = widget.make_weak_ptr(); }