Closed audiamus closed 2 years ago
I am also having this issue, I hope the attached log file can help! 👍 BookLibConnect.FormsTest_2022-02-05_001.log
Are you running this on a 4k monitor with increased font size?
Screenshots are also welcome.
Unfortunately, I still haven't a clue what's happening here.
I am in fact, yes. 3840x2160 with 250% scaling.
From: audiamus @.> Sent: Sunday, February 6, 2022 12:24:56 AM To: audiamus/BookLibConnect @.> Cc: MidCtrlDel @.>; Comment @.> Subject: Re: [audiamus/BookLibConnect] Window size and element visibility (Issue #12)
Are you running this on a 4k monitor with increased font size?
— Reply to this email directly, view it on GitHubhttps://github.com/audiamus/BookLibConnect/issues/12#issuecomment-1030768661, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AXUFSYH5O6NA5U37VFYS22DUZYO4RANCNFSM5NELT52A. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.Message ID: @.***>
And this is what is what it looks like on my end (minus the fact that I obfuscated the titles)
Right. It very much looks like an issue with the underlying .Net WinForms libraries. While they say, they would automatically adapt to high DPI scaling, there may be limits.
For the top left panel, its left anchor should be the left window border. But that appears to be ignored. The right anchor seems to be observed.
For the bottom panel with the splitter bars, their original positions appear not to be scaled upwards.
I tested on a hi-dpi laptop monitor, but only up to 150%, and it worked there.
I have uploaded a new version of the test: BookLibConnect.FormsTest.zip version 1.1
Regarding behaviour, the only change I made was to set High DPI awareness to the highest level. It was on a more basic level before.
I also added more log output for some of the elements ("controls"). They also spill out their absolute coordinates on the screen. Still in diagnostic mode.
@audiamus That makes sense, my Surface Pro 7 defaults to 200% scaling and when I adjusted that the buttons came back.
If I set the scaling to 100% and start the app it continues to work after being set back to 200% for that run. When I reopen at 200% those buttons are lost off the left side again in the download window.
Did you try the latest version of our test program here? Same effect? In any case I would be grateful for a log file with that new version.
Same effect with the Test Program BookLibConnect.FormsTest_2022-02-06_001.log
With Scaling set to 150% BookLibConnect.FormsTest_2022-02-06_001.log
Thank you. This gives me an idea what's happening to the buttons. (I haven't yet analysed the other log output.)
While I could not find a pattern behind this behaviour, it appears that some anchor mechanisms for the Windows Forms controls (the visual elements) do not adapt properly to Hi DPI scaling modes at higher settings.
I have modified the hierarchy that contains the affected buttons and tested it for upscaling unto 200%. Works for me on that test system now where I could reproduce the problem before.
I also now explicitly set the splitter positions as they don't seem to adapt either.
New version: BookLibConnect.FormsTest.zip version 1.2
I have released Book Lib Connect 0.4 now, with the same modifications as in the test program. I hope it fixes the Hi DPI issues.
Users on Reddit have reported an issue with the size of one dialog window, visibility of a panel and position of splitter bars.
Update after feedback, see below: The problem has to do with High DPI screens and upscaling in the Windows settings.
I have created a dummy app for the windows in question. There is no installer, just a zip. BookLibConnect.FormsTest.zip, new version 1.2 (And it doesn't really need the SQLite DLL that comes with it, but it won't start without it, The underlying code is still Book Lib Connect.)
Please try it. Do the [Try restore] buttons have any effect?
It writes additional log info to
C:\Users\<USER>\AppData\Local\audiamus\BookLibConnect.FormsTest\log
You can upload the log files here. They do not contain sensitive data.