Skip to content

Conversation

@cameronwhite
Copy link
Member

This fixes a regression from 079c086 where starting a drag outside the canvas was ignored. This happened because the new canvas widget configures the H/Valign properties to avoid expansion (simplifying a lot of other code), so the drag was outside the canvas widget itself - therefore, we need to attach it to a parent widget which contains the empty space.

The changes are just relocating the gesture controllers, with a couple notes

  • We now need to translate the gesture coordinates to the canvas widget's space
  • The WindowMousePosition property is no longer needed since this was only for communicating between the two widgets

The key press event handlers were also moved for consistency

Fixes: #1908

This fixes a regression from 079c086 where starting a drag outside the canvas was ignored. This happened because the new canvas widget configures the H/Valign properties to avoid expansion (simplifying a lot of other code), so the drag was outside the canvas widget itself - therefore, we need to attach it to a parent widget which contains the empty space.

The changes are just relocating the gesture controllers, with a couple notes
- We now need to translate the gesture coordinates to the canvas widget's space
- The WindowMousePosition property is no longer needed since this was only for communicating between the two widgets

The key press event handlers were also moved for consistency

Fixes: #1908
This was a regression with the new canvas widget in Pinta 3.1
@cameronwhite cameronwhite merged commit fa6482f into master Jan 9, 2026
13 checks passed
@cameronwhite cameronwhite deleted the fix/canvas-events branch January 9, 2026 04:17
cameronwhite added a commit that referenced this pull request Jan 10, 2026
* Attach canvas event handlers to the outer grid.

This fixes a regression from 079c086 where starting a drag outside the canvas was ignored. This happened because the new canvas widget configures the H/Valign properties to avoid expansion (simplifying a lot of other code), so the drag was outside the canvas widget itself - therefore, we need to attach it to a parent widget which contains the empty space.

The changes are just relocating the gesture controllers, with a couple notes
- We now need to translate the gesture coordinates to the canvas widget's space
- The WindowMousePosition property is no longer needed since this was only for communicating between the two widgets

The key press event handlers were also moved for consistency

* Update the canvas position in the statusbar while dragging

This was a regression with the new canvas widget in Pinta 3.1

Fixes: #1908
(cherry picked from commit fa6482f)
cameronwhite added a commit that referenced this pull request Jan 10, 2026
* Attach canvas event handlers to the outer grid.

This fixes a regression from 079c086 where starting a drag outside the canvas was ignored. This happened because the new canvas widget configures the H/Valign properties to avoid expansion (simplifying a lot of other code), so the drag was outside the canvas widget itself - therefore, we need to attach it to a parent widget which contains the empty space.

The changes are just relocating the gesture controllers, with a couple notes
- We now need to translate the gesture coordinates to the canvas widget's space
- The WindowMousePosition property is no longer needed since this was only for communicating between the two widgets

The key press event handlers were also moved for consistency

* Update the canvas position in the statusbar while dragging

This was a regression with the new canvas widget in Pinta 3.1

Fixes: #1908
(cherry picked from commit fa6482f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Select doesn't work out of bounds(?)

2 participants