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

Improve high-dpi display #9381

Conversation

sasumner
Copy link
Contributor

@sasumner sasumner commented Jan 10, 2021

Fix #8115 (and probably others)

Seems to improve things on high-dpi monitors? (without any otherwise obvious problems)
Here's my result (a definite improvement) -- perhaps the screenshot removes some of the crispness of reality, though!
On the left is N++ 7.9.2; on the right is the result from this PR -- font size settings are the same for each.
This is running on Win10.
Would appreciate if others would try on various OS and monitor situations!

image

Credit (or blame) to @xianyun666

@chcg chcg added the enhancement Proposed enhancements of existing features label Jan 10, 2021
@chcg
Copy link
Contributor

chcg commented Jan 10, 2021

See https://docs.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows

Per-Monitor V1 DPI awareness mode (PMv1) was introduced with Windows 8.1. This DPI awareness mode is very limited and only offers the functionality listed below. It is recommended that desktop applications use Per-Monitor v2 awareness mode, supported on Windows 10 1703 or above.

So maybe "PerMonitorV2" might be even better on modern Win10 versions.

@sasumner
Copy link
Contributor Author

@chcg said:

So maybe "PerMonitorV2" might be even better on modern Win10 versions.

Let's try it! (it is in 80d4780)

@donho donho self-assigned this Jan 11, 2021
@donho
Copy link
Member

donho commented Jan 11, 2021

@sasumner
Could you confirm that you can still reproduce the problem that @xianyun666 have mentioned?

@sasumner
Copy link
Contributor Author

Could you confirm that you can still reproduce the problem that @xianyun666 have mentioned?

Interestingly, with PerMonitorV2, this time the bad effects were lessened, so I missed them.
But, yes, with V2 there are some bad UI elements...

So, I'll back this PR off to only use PerMonitor where I haven't yet seen any bad effects.
But it would be nice if many others could try it as well!

Here's a new screenshot, again with PerMonitor on my high-dpi screen, and again with 7.9.2 on the left, and the PerMonitor version of this PR on the right:

image

@sasumner
Copy link
Contributor Author

Note: 0cec1bd removes PerMonitorV2 and restores PerMonitor

Sorry for the flip-flopping and possible confusion it generates.

@donho
Copy link
Member

donho commented Jan 11, 2021

But, yes, with V2 there are some bad UI elements...

Could you provide the screen shot please?

@sasumner
Copy link
Contributor Author

Could you provide the screen shot please? (using PerMonitorV2)

Ok, so to make screenshots I put PerMonitorV2 back in place.
And I have no explanation for this, but it looks A LOT worse than when I looked at it yesterday or even earlier today.
But here are some of the bad UI examples:

Find when opened onto a high-dpi monitor:
image

Find when opened onto a non-high-dpi monitor:
image

Shortcut Mapper when opened onto a high-dpi monitor:
image

Shortcut Mapper when opened onto a non-high-dpi monitor:
image

@donho
Copy link
Member

donho commented Jan 11, 2021

Thank you very much @sasumner for your screenshots.
I don't know such display bug from Windows or Notepad++ - or it's due to part of your system (your OS) is not updated.
In any case, let's do it without V2.

@donho donho added the accepted label Jan 11, 2021
@donho donho closed this in 1364b19 Jan 11, 2021
@donho
Copy link
Member

donho commented Feb 24, 2021

In fact, with V2 render the better standard GUI. OTOH, all the non standard GUI parts are f*cked up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted enhancement Proposed enhancements of existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants