Open ziomau10 opened 4 years ago
Thank you for your report, Mau! I could not reproduce this issue, unfortunately, but I think it's somehow related to high-DPI display and virtual resolution (resolution scale) providing by OS.
Could you please confirm that OS is Windows 10, and, if so, provide some additional information by following points:
Thanks!
Thank you for your answer, and here are the results of my tests: Yes os is Windows 10 Pro.
Anyway, don't worry ... I've seen software from branded names (even from Micr***t) fail miserably with high DPI displays. It seems than nobody is getting it right. Hope this helps, and let me know if you need more tests or beta test or something. Regrads.
Thank you for the info!
You are right. Unfortunately, virtual resolution support is an open issue for GUI frameworks and libraries.
I will try to update Qt (GUI framework). If it doesn't help I'll keep track of new releases. You can leave this issue open, so that I can update it and be in touch.
Thank you very much. Should you need me to test something or whatever feel free to ask. Good job.
Looking for something else I stumbled upon this: https://stackoverflow.com/questions/39247342/pyqt-gui-size-on-high-resolution-screens
Maybe it can be useful to fix the edit box issue. I'd test it myself, but I believe it will take me ages to install the PyQT development chain in order to do this simple test.
Additionally I have seen in the code, the following fragment:
if platform == 'win':
self.layout.setContentsMargins(0, 0, 2, 0)
self.setFixedHeight(self.widget.buttonsSize - 2)
else:
self.layout.setContentsMargins(0, 0, 3, 0)
self.setFixedHeight(self.widget.buttonsSize)
which seems to reduce the edit height on windows platform. Can you have a look? Best regards. Mau.
Mau, check the latest release, please.
I looked at the fragment you quoted. Here I've fixed the difference between calculation field height and inline buttons height, because buttons size in Windows were being calculated 2px bigger (1px each side) than rendered. So, if I don't reduce that height in Windows by buttonsSize - 2
, assigning self.widget.buttonsSize
parameter to selfFixedHeight
of calculation field makes the latter's height visually bigger.
I looked also at the stackoverflow reference. I upgraded both Python and PyQt versions (see About in app), but I intentionally avoided setting that AA_EnableHighDpiScaling
and AA_UseHighDpiPixmaps
attributes, because I cannot reproduce high-dpi environment and test on side-effects.
I still cannot reproduce the main issue neither before nor after PyQt upgrade. I believe the problem is not the height, but the system default font size, which was increased (as a correction) for Windows before this release. So, added a font-size change setting (near the resolution selector) and removed that increasing correction for Windows. Try to manually set suitable font size. Hope it will help.
Thank you for your immediate response. The possibility to change the font size is great: Even the default size 8 was ok, but setting it to 7 results in the above picture which is perfecly ok.
Regarding the HighDpi test, I have one! ;) I understand you should not commit any change without testing ... but I can test it for you in high dpi screen. I cannot promise as quick response as yours, but I can promise to make the tests if you send me some test binary ...
Keep the good work. Thanks. Mau.
Thanks for the support, Mau! I’ll prepare it for the next release, but I'm afraid it won't be soon (too much refactoring is needed).
I’m glad it helped you. Kind regards.
Great, when you have something to test, let me know Regards. Mau.
Dear Levon, I really appreciate this tool. I am using a notepad with 4K display and I have a problem. The command line, where one types the expressions is a little small (or the font is too big) and clips the top and bottom of the text. Using resolution double is slightly worse:
Can you please add some more room around the text line, or make the division draggable (whichever is easier for you)
Thank you very much. I am using this tool daily ... Regards. Mau.