Make the Fill tool's fill click operation cancellable (#1666)

* Make FillTool a draggable tool with abortable fills

* Unify keyhints across tools

* Apply suggestions from code review

* Formatting

* Fix FillTool when draged outside of shape's layer and add toolswitch abort

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
milan-sedivy
2024-03-11 23:18:49 +02:00
committed by GitHub
parent 343523ab34
commit 01da53eba0
2 changed files with 52 additions and 17 deletions

View File

@@ -253,6 +253,9 @@ pub fn default_mapping() -> Mapping {
// FillToolMessage
entry!(KeyDown(Lmb); action_dispatch=FillToolMessage::FillPrimaryColor),
entry!(KeyDown(Lmb); modifiers=[Shift], action_dispatch=FillToolMessage::FillSecondaryColor),
entry!(KeyUp(Lmb); action_dispatch=FillToolMessage::PointerUp),
entry!(KeyDown(Rmb); action_dispatch=FillToolMessage::Abort),
entry!(KeyDown(Escape); action_dispatch=FillToolMessage::Abort),
//
// BrushToolMessage
entry!(PointerMove; action_dispatch=BrushToolMessage::PointerMove),