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

4K and Scaling #12

Open
kalatchev opened this issue Jun 8, 2024 · 9 comments
Open

4K and Scaling #12

kalatchev opened this issue Jun 8, 2024 · 9 comments

Comments

@kalatchev
Copy link

Kudos for the project!

I found that at least demo, is not scaling aware.

@smourier
Copy link
Contributor

smourier commented Jun 8, 2024

Hi,

Thanks! I'm working on an AOT version but I'm waiting for some Microsoft's pieces improvements (namely C#/WinRT).

It's not aware in the sense that the application's window will not scale when moved from say a 100% to a 150% screen but it's aware in the sense that it's declared as dpiAwareness PerMonitorV2, and it should not disfunction (as some UI framework do even when they are supposedly "aware") when moved over, ie: the whole window should display fine and identical when moved around, unless I've missed something.

It also means you should be able to add some custom code, or override things to adapt if needed.

Do you have a specific scenario in mind?

@MIRIMIRIM
Copy link

MIRIMIRIM commented Jun 27, 2024

I’m not sure if this is the case he’s talking about, but the following image shows the display effect at 150%, and these appears to be smaller than when I started at 100%.

image

@smourier
Copy link
Contributor

How exactly do you get to see that? This is what I get with a 150% scale:

image

@MIRIMIRIM
Copy link

I use a 14-inch laptop with Windows11 24H2, the previous screenshot was of me maximizing the window

image

@smourier
Copy link
Contributor

I don't reproduce what you see, it seems related to rich text boxes (codebox that display sample colorized sample code). Other texts seems the same size.

I've added some extra diagnostics you can post here (you must get latest and recompile), here is mine (in About / System Info):

image

@MIRIMIRIM
Copy link

image

@smourier
Copy link
Contributor

smourier commented Jun 27, 2024

Ok, I get it, it's related to the primary display, I have two and was doing my testing with a non-primary one. You have only one. When I change DPI for the primary one I also see bigger Rich Text Boxes.

Rich Text Box is one of rare Wice components that rely on an underlying windows component (Richedit or Office Richedit https://learn.microsoft.com/en-us/windows/win32/controls/about-rich-edit-controls). Apparently this behaves in a way that causes the difference between Wice texts and Rich Text Box texts.

I need to investigate this further.

@smourier
Copy link
Contributor

Ok I've made some changes in RichTextBox code (and also in titlebar which had some issues in hi-DPI contexts too). Can you try it?

@MIRIMIRIM
Copy link

RichTextBox and titlebar look fine

old
5df5926a9502f1cce93b5e47f9b911e3

new
2e180663fe1102aef42500e57295a888

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

3 participants