gama-platform / gama.old

Main repository for developing the 1.x versions of GAMA
GNU General Public License v3.0
303 stars 99 forks source link

On windows, on second screen contextual icons are not displayed correctly when scaling ratios are different #3673

Closed lesquoyb closed 1 year ago

lesquoyb commented 1 year ago

Describe the bug When running gama on my second screen, which has a different scaling ratio than my primary screen, all the contextual icons are broken: image Normal icons are pixelated and the deactivated ones are darkened more than they should. If I set the same scaling ratio on both screens everything works fine. It appears in the release and in the git version. Eclipse doesn't have that bug so I guess it's avoidable It's the same with icons in contextual menu when right clicking

AlexisDrogoul commented 1 year ago

Beware that this behaviour only happens (as far as I can tell from the experiments I conducted on Windows 11) in Eclipse / development mode. When running a release, I cannot reproduce any of this. First image is on a display with 200% zoom

image

Second is after moving it to a display with 100% zoom

Enregistrement 2023-03-18 093658

The scaling of everything appears correct.

However, conducting the exact same manipulations using the development version (from Eclipse) leads to what you are describing. I therefore propose to close this issue, if you can test it is the same in your case ?

lesquoyb commented 1 year ago

I just tried again and can confirm it is present on the release too for me.

hqnghi88 commented 1 year ago

@lesquoyb not much hope but can you try again with some trick on win: run as admin, or the hdpi in properties of application

AlexisDrogoul commented 1 year ago

Yep. I think there is definitely something fishy with your settings @lesquoyb -- things are really running smoothly on my side , and I did not change any per-application setting to achieve it.

lesquoyb commented 1 year ago

I tried to run it in admin with no difference, also tried to force gama to be run on my nvidia gpu or on my amd chipset, no difference either. Good to know that it's not something widespread though.

About my setup: windows 11 integrated amd gpu chipset dedicated gpu nvidia geforce mx450 I force gama to run on the nvidia gpu to avoid the amd bug with some displays main screen is 15", 2K resolution, usually using 200% or 150% scaling ratio my second screens are normal (not high dpi) 1920x1080 monitors with 100% or 150% scaling ratio depending if at work or home it's connected through usb-c to a hub and then via hdmi

Do you see anything else worth mentioning ?

AlexisDrogoul commented 1 year ago

Are there any per-app settings you may have set when running older versions of GAMA ?

hqnghi88 commented 1 year ago

change manually gama.exe to something.exe to see anything change?

lesquoyb commented 1 year ago

There's no special setting that I'm aware of, were you thinking about something in particular ? I tried changing the name and it didn't change anything

hqnghi88 commented 1 year ago

well nothing on my side, i tried to change the combination of zoom on both 2 displays: main is amd (asus rog g14), 2nd is samsung fullhd through hdmi. I cant see pixelation with my poor eyes but there is no darken disabled thing. One last thing is the win ver. Could you show yours? Any way if you have time to specify the exact steps to reproduce, we can consider that as a OS configuration problem? image

AlexisDrogoul commented 1 year ago

@lesquoyb Can't you specify on Windows the zoom on an individual basis (i.e. such app will zoom, such will not, etc.) ? If not, forget about my comment. But I was thinking about something like this: https://www.windowscentral.com/how-change-high-dpi-settings-classic-apps-windows-10-april-2018-update

AlexisDrogoul commented 1 year ago

I've tried all the different scales and combinations of the two monitors I have and everything remains fine. Maybe you are hit by this bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=563923 ? Doesn't seem to be widespread, may be linked with some specific graphics configuration ?

lesquoyb commented 1 year ago

There's actually a trick in the first link you posted that solved the issue for me: it was to set the High DPI scaling override application setting to true. And not only does it fixes this issue but it also fixes the issue gama-platform/gama#3672, gama-platform/gama#3671, partially the issue gama-platform/gama2#48 and may help with the issue gama-platform/gama#3674 . The setting that seems to yield the best results is having the system option selected. So I guess we only need to document this trick in troubleshooting to close this issue and gama-platform/gama#3672. On the microsoft documentation about this setting they mention the surface pro as prone to that kind of bug, so I guess it only appears with really specific hardware with hidpi + unconventional aspect ratio (16:10 in my case, 3:2 for the surface)

AlexisDrogoul commented 1 year ago

Cool ! Is there a way to have this setting by default, for instance in the installer ? Or will it break other configurations ?

lesquoyb commented 1 year ago

I was looking up for that info too, I'll keep you updated. I don't know if it'll break something else yet, as far as I've seen everything is working well, but there are so many things that can go wrong without being noticed at first sight.

For info: eclipse doesn't have all those display problems on my configuration and yet doesn't have that option checked by default..

My point of view on this is that for now it doesn't seem to concern many computer, so it's better that we keep a version that we know works for most and explain how to fix those issues in the documentation for the few that may encounter them. So we can finally produce a release. And if we find out it's possible to force that setting in the install script, we'll put it in the next alpha in order to have time to test it later

hqnghi88 commented 1 year ago

Hi, As I experienced the insider version (updates per weeks) there is always a kind of this problems related to the windows cores. I dont know what is the usual for windows users as there is no term of long-term support as in linux (there is just BIG update - with BIG bug or seasoning updates - with random bugs). May be the pro user ( who paid more) have their technical support with these or just goback/wait for the next release. I propose, if you have 2 machines, to test with the latest insider version then.

lesquoyb commented 1 year ago

I updated the documentation to talk about this workaround and also added by default this setting in the windows installer script, as it actually also solves other issues. It should now be solved