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

Forms layout when using multiple displays with different scale #32

Open
dmason-mis opened this issue Oct 6, 2020 · 2 comments
Open

Comments

@dmason-mis
Copy link

dmason-mis commented Oct 6, 2020

I'm using a laptop display at 125% scale and an external monitor at 100% scale.

It can happen this way...
Start with VS on the 100% display.
Right click a changed file in solution explorer and access the Commit form.

(1) Form appears on the 100% display, it's resized incorrectly and the buttons are inaccessible.

  • Move it to the 125% display - it then automatically lays out correctly.

OR

(2) Form appears on the 125% display, it's resized incorrectly and the buttons are inaccessible.

  • Move it to the 100% display, close the form and reopen. Goto (1).

image

@PhilJollans
Copy link
Owner

Visual Studio 2019 introduced per monitor DPI awareness. This actually broke AnkSvn, causing some windows to appear blank.

There is a good description of this problem on this page
https://blog.jetbrains.com/dotnet/2019/06/11/blank-tool-windows-resharper-visual-studio-2019-net-framework-4-8-per-monitor-dpi-awareness/

There is another description here:
https://devblogs.microsoft.com/visualstudio/a-better-multi-monitor-experience-with-visual-studio-2019/

I made the minimum fix to make AnkhSvn work, by calling the function SetThreadDpiAwarenessContext with the parameter NativeImports.DPI_AWARENESS_CONTEXT.SystemAware.

The better solution would be full support for Per-monitor DPI awareness V2 (PMv2), but at present I don't know enough about it, or about the window management in AnkhSVN to implement it.

@dmason-mis
Copy link
Author

Thanks for this information.

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

No branches or pull requests

2 participants