Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouse is not properly aligned in VS designer view #293

Closed
amSnoop opened this issue Feb 6, 2023 · 4 comments
Closed

Mouse is not properly aligned in VS designer view #293

amSnoop opened this issue Feb 6, 2023 · 4 comments
Labels

Comments

@amSnoop
Copy link

amSnoop commented Feb 6, 2023

Describe the bug
When using VS to preview chances to axaml files, the mouse pointer that Avalonia sees does not align with the actual position of the mouse pointer that Windows sees. The designer does recognize properly when the mouse is not over the window at all, which in my video example below means that I cannot click the Import button no matter how hard I try, nor can I use scroll bars.

To Reproduce
Steps to reproduce the behavior:

  1. Create any kind of window with Avalonia (best noticed when there are elements that react to being clicked or moused-over)
  2. Open the axaml file for any window, letting VS automatically bring up the designer view
  3. Observe that the mouse is not aligned.

This happens even when I use the extension to create a new Avalonia app from scratch

Expected behavior
The designer would properly portray the position of the mouse

Video Example
https://user-images.githubusercontent.com/49213176/217029090-3933eec4-e0f4-483d-a208-7f9f4e0049ba.mp4

Desktop (please complete the following information):

  • OS: Windows 11
  • Version 0.10.18 and 0.10.15

Additional context
Visual Studio 22

@amSnoop amSnoop added the bug label Feb 6, 2023
@amwx
Copy link
Contributor

amwx commented Feb 7, 2023

I think I remember something like this a while ago, but its been some time since I've noticed it so I think this has been fixed somewhere in all the 11.0 stuff.

@maxkatz6 maxkatz6 transferred this issue from AvaloniaUI/Avalonia Feb 8, 2023
@amSnoop
Copy link
Author

amSnoop commented Feb 9, 2023

I attempted to update to 11 preview 5, but I had a lot of trouble and am not experienced enough to figure it out on my own (I could not find any published information about the issue I was having, which was just getting the basic app template to build after migrating)

Is the only fix for this issue really to update? It seems weird that at least 4 versions (0.10.15-18) would all have this same bug without me being able to find any information about it online. Is there any other kind of fix or workaround?

Edit: I finally got Solitaire from https://github.com/AvaloniaUI/Solitaire and loaded its main window in the designer. The issue was not corrected for me. It still does not align the mouse pointer with the actual position of the mouse.

@amwx
Copy link
Contributor

amwx commented Feb 9, 2023

Is your computer/monitor using a non 100% display scaling? At 100% all is fine, but if I change the monitor's scaling to anything else the pointer is offset in the previewer.

@amSnoop
Copy link
Author

amSnoop commented Feb 9, 2023

Oh my god.......

I use 125% because I have rather small 2k monitors. I've never had an issue with in other programs but that does indeed fix the issue for me. That really really sucks lmfao. Thanks for the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants