AdamsLair / duality

a 2D Game Development Framework
https://adamslair.github.io/duality
MIT License
1.41k stars 290 forks source link

Windows DPI Awareness #140

Open cphillips83 opened 9 years ago

cphillips83 commented 9 years ago

A lot of the editor seems to display and render things incorrectly or cut off when you change the DPI of windows. My MacBook Pro runs at 2880x1800 at a native resolution but thats far to small to read anything so I increased my DPI to "Larger - 150%" under "Control Panel\All Control Panel Items\Display".

AdamsLair commented 9 years ago

Duality has currently no support for manual DPI handling, but it should be fine as long as DPI virtualization kicks in. Apparently, this is not the case on your machine.

cphillips83 commented 9 years ago

Windows 7 SP1 and I did not try a manual tool, let me post some screen shots as well. The biggest problem that makes it almost unusable is that the menu is offset like this at the top.

dual

I also did not miss crop the top, as you see the title bar is even weirdly offset off the screen when its maximized. Now the problem I have with the menu is that the sub menus appear as if the main menu was up further in that black border so when I click where the menu is now, it almost always clicks the first item in the child menu at the same time not letting me get to other options.

overlap

cphillips83 commented 9 years ago

Here is another one, some of the property windows contents disappeared and if you look, I clicked on "CamView Camera" dropdown at the top middle and the dropdown appeared clear left which is about where I would expect it if my font was set to 100%. It seems like some of it is getting the scaling and some isn't.

odd placing

AdamsLair commented 9 years ago

Huh.. this is really strange. Can you check the following cases?

Thanks for the screenshots so far. Those contain quite some valuable hints.

cphillips83 commented 9 years ago

Deleting the app.manifest didn't help, I'll change the others later tonight when I get some free time. Thanks for the help so far.

ilexp commented 8 years ago

Just a somewhat late update on the current status of this: I have added a manifest file to Duality that explicitly states it's not DPI aware, allowing Windows to use virtual DPIs on the editor application. The UI will be rendered and updated as if on a low-DPI device, but scaled up accordingly by the operating system. It's not a fix, but a workaround until this can be fixed properly.