mbrlabs / Lorien

Infinite canvas drawing/whiteboarding app for Windows, Linux and macOS. Made with Godot.
MIT License
5.55k stars 241 forks source link

Odd cursor placement in canvas with scaled UI #167

Closed hansemro closed 2 years ago

hansemro commented 2 years ago

Lorien version: v0.6.0-dev Regression introduced by 56e0faeb0d84b78cfce9267e37f03b3f806dfe70

OS/device including version: Manjaro + KDE macOS Big Sur Windows 10

Issue description:

With scaled UI > 1:

  1. Cursor jumps when moving in and out of canvas. There is a big jump on right and bottom sides of canvas.
  2. BrushTool strokes do not get drawn under cursor. Other tools don't have this specific problem (?)
  3. Cursor moves when zooming in/out, then jumps when moving cursor.

https://user-images.githubusercontent.com/40348686/175232411-a65d2bdb-138f-496d-af14-39bc75d69574.mp4

Steps to reproduce:

Sub-issue 1:

  1. Set UI Scale to a value greater than 1.
  2. Move cursor in and out of canvas from all sides.

Sub-issue 2:

  1. Set UI Scale to a value greater than 1.
  2. Select BrushTool and draw.

Sub-issue 3:

  1. Set UI Scale to a value greater than 1.
  2. Place cursor on canvas.
  3. Zoom out several steps without moving cursor.
  4. Move cursor and observe cursor jump.
hansemro commented 2 years ago

@MrApplejuice Any ideas?

MrApplejuice commented 2 years ago

Hi @hansemro . Yeah, I think that I know why this is happening. Cannot check on it right now, but I can probably check it while working on the keybindings as I am reformatting the event toolchain anyway :+1: