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

Scaling for High DPI #23

Closed
42willow opened this issue May 16, 2022 · 12 comments · Fixed by #32
Closed

Scaling for High DPI #23

42willow opened this issue May 16, 2022 · 12 comments · Fixed by #32
Assignees
Labels
bug Something isn't working

Comments

@42willow
Copy link

No description provided.

@42willow
Copy link
Author

.. I think it may have something to do with it being 32 bit

@Twometer
Copy link
Owner

Do you mean scaling for HiDPI screens?

@42willow
Copy link
Author

actually, maybe it's just my screen...

@42willow 42willow changed the title Is it possible to make it a higher resolution? Is it possible for the context menu to be consistent with the Windows 11 UI? May 16, 2022
@42willow 42willow changed the title Is it possible for the context menu to be consistent with the Windows 11 UI? Is it possible to make it a higher resolution? May 16, 2022
@42willow
Copy link
Author

42willow commented May 16, 2022

Never mind it is definitely the app

@42willow
Copy link
Author

42willow commented May 16, 2022

Do you mean scaling for HiDPI screens?
@Twometer

No, my screen is only 1920 x 1080 pixels and there is a huge difference between the windows context menu and the app context menu.

this
image
versus
image
and
image

@GordnCZ
Copy link
Contributor

GordnCZ commented May 16, 2022

@42Mockingjay That's "just" the new Windows 11 thing.
It would probably need to be moved to new API for the context menu to look the same.

@42willow
Copy link
Author

So it is the OS and not the app?

@emerysteele
Copy link

Are you referring to the conext menu text being a bit fuzzy/blurry?

If so, I think it might be the app is not re-adjusting to different display scalings.

It looks fine on my end with 100% scaling, but if set to higher (125% or 150% or 175%) it gets progressively blurry. I think with some code changes it might be possible to have it re-render for different scaling. I'm not super familiar with c# desktop apps though so not sure how that would be done.

Can maybe check your display scaling options to see if that is what is causing it? Right click on your Desktop, choose Display settings. Then click on your screen + scroll down to Scale and layout. See what % it's at.

If you mean the format/layout of the context menu, yeah that would require api changes. Might break compatibility with running NoFences on older Windows. Unless there is a way to programatically chose which kind of context menu is shown, depending on the OS
1mGZPbZXmR
7RuBWptP1H
.

@Twometer
Copy link
Owner

Programatically opening the context menu on Windows is a huge pain. If you look into the ShellContextMenu.cs that I got from CodeProject, which has over 1500 lines of code, you can see that.

I'm going to see if I can do something like this for the modern Windows 11 context menu and show the appropriate one depending on the current OS version. However, I will move that part to a separate issue, and address that in the next major update (v2.0.0)

I'm also reopening this issue as the scaling issue, since NoFences should work on all scaling factors.

@Twometer Twometer reopened this May 17, 2022
@Twometer Twometer self-assigned this May 17, 2022
@Twometer Twometer added enhancement New feature or request bug Something isn't working and removed enhancement New feature or request labels May 17, 2022
@42willow
Copy link
Author

42willow commented May 18, 2022

Are you referring to the conext menu text being a bit fuzzy/blurry?

If so, I think it might be the app is not re-adjusting to different display scalings.

It looks fine on my end with 100% scaling, but if set to higher (125% or 150% or 175%) it gets progressively blurry. I think with some code changes it might be possible to have it re-render for different scaling. I'm not super familiar with c# desktop apps though so not sure how that would be done.

Can maybe check your display scaling options to see if that is what is causing it? Right click on your Desktop, choose Display settings. Then click on your screen + scroll down to Scale and layout. See what % it's at.

If you mean the format/layout of the context menu, yeah that would require api changes. Might break compatibility with running NoFences on older Windows. Unless there is a way to programatically chose which kind of context menu is shown, depending on the OS 1mGZPbZXmR 7RuBWptP1H .

That will be the problem, my scaling is set to 125% as I am on a laptop, I temporarily set the scaling to 100% and it fixed the blurry context menu issue.

@42willow 42willow changed the title Is it possible to make it a higher resolution? Scaling for High DPI May 18, 2022
@GordnCZ
Copy link
Contributor

GordnCZ commented May 18, 2022

@Twometer At this point, wouldn't it be better to write own context menu that would also be designed to fit the set style of fences?

But yes, that's already different issue.

@Twometer
Copy link
Owner

@GordnCZ Yes that would indeed be better, as it would also remove the need for having Rightclick and Shift+Rightclick to access two different context menus, but then we'd have to build the menu from scratch, which can be difficult due to some apps like Notepad++ registering custom items.

However, I think we should continue discussing context menus in #29, as the scaling issue is already being worked on in #32 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants