Respect device scale when calculating viewport bounds#3305
Respect device scale when calculating viewport bounds#3305Sambhram1 wants to merge 7 commits intoGraphiteEditor:masterfrom
Conversation
|
@timon-schelling this is probably related to your upcoming work right? |
Yeah, I'm gonna test it with desktop later, maybe enough to set browser scale and apply this patch. |
|
@Sambhram1 are you still working on this? See CI for formatting issues.
|
|
@timon-schelling i will solve ci issue and push |
|
@Sambhram1 you can |
|
!build |
|
|
This PR adds offsets to tools when browser zoom != 100%. But this is essentially the conversion we need on desktop. |
|
Basically this solves the wrong issue. Scale not being applied for one tool, is fixed by scaling all coordinates, breaks other tools along the way. @TrueDoctor We should decide if we want to work with logical or physical pixels in tools. I will mark this as draft for now. |
|
@Sambhram1 This did end up being a much bigger undertaking since there were many edge cases where the approach shown here did not give the correct results. This PR was thus ultimately superseded by this one: #3331 so I think this should be safe to close. So thanks a lot for your work, even tough it did not get merged in the end. Can you please test if this still fixes #3286 ? |

Scale all pointer coordinates and viewport bounds by before sending them to the backend. This ensures consistent coordinate spaces across the entire rendering pipeline.