Improve support of high DPI displays
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Improve support of high DPI displays
There is an interesting Qt blog about support of high DPI displays: https://blog.qt.io/blog/2016/01/26/high ... in-qt-5-6/
An interesting fact is that it can be tested on any hardware, i.e. also on low resolution displays. All what must be set is the environment QT_SCALE_FACTOR=1.5 (or any other value) before starting the application.
This way I could reproduce the issue issue #0003130 where the rubberband has an offset.
An interesting fact is that it can be tested on any hardware, i.e. also on low resolution displays. All what must be set is the environment QT_SCALE_FACTOR=1.5 (or any other value) before starting the application.
This way I could reproduce the issue issue #0003130 where the rubberband has an offset.
Re: Improve support of high DPI displays
I see some commits to master from wmayer.https://github.com/FreeCAD/FreeCAD/commits/master
@looo are you able to provide a build for this? Great work. When you are ready I would like to uplaod an OSX build to the releases page as a release candidate, let me know when you are ready.
"fight the good fight"
Re: Improve support of high DPI displays
Since we split the 0.18 branch I have pushed a couple of commits to the master branch. Some of them can be backported to v0.18:
git commit a14b99e77
git commit 2f2d50535
git commit bb6e4e6ad
git commit 23ecb8eac
git commit ca7770b80
git commit 51fcdd2c0
git commit 805ccd8deb
git commit 347156403
git commit 094dda5900d
git commit 925cffc1535
git commit 7dfeb801a
Re: Improve support of high DPI displays
I tested a FC 0.19 build on a hi-DPI laptop and it seems that FC does not recognize that it runs on a Hi-DPI PC. The About dialog is so big it even blocks the usage of FC: https://forum.freecadweb.org/viewtopic.php?f=10&t=56425
But I see that also on a fresh installation the toolbars are huge, as well as the text in the Start WB, the images in the preferences dialog sidebar are pixelated etc.
Do I have to set a special build option in CMake to get it right?
But I see that also on a fresh installation the toolbars are huge, as well as the text in the Start WB, the images in the preferences dialog sidebar are pixelated etc.
Do I have to set a special build option in CMake to get it right?
Re: Improve support of high DPI displays
I'm not sure what's going on in your case there, @uwestoehr -- I run almost exclusively on HiDPI displays and while there are certainly issues, in order to duplicate your results I had to turn off FreeCAD's internal scaling by telling Windows to do the scaling itself. Nevertheless, it may be a moot point going forward since we can now guarantee that users of 0.20 have at least Qt 5.9, so many of Qt's HiDPI facilities are now available to us. I hope to spend some time on that project during the 0.20 dev cycle.
Re: Improve support of high DPI displays
To my knowledge, there's no CMake option.
The only condition we have is a fresh Qt version. Have you upgraded your Qt version recently?
Maybe you have a large font size set in your FreeCAD settings?
Or some plugin that scales all text sizes up or down.
In older Qt version there's an option of setting environment variable QT_SCALE_FACTOR. Maybe you have it set to a large value?
That was required for old Qt versions, but not anymore.
https://doc.qt.io/qt-5/highdpi.html
The only condition we have is a fresh Qt version. Have you upgraded your Qt version recently?
Maybe you have a large font size set in your FreeCAD settings?
Or some plugin that scales all text sizes up or down.
In older Qt version there's an option of setting environment variable QT_SCALE_FACTOR. Maybe you have it set to a large value?
That was required for old Qt versions, but not anymore.
https://doc.qt.io/qt-5/highdpi.html
Re: Improve support of high DPI displays
I use the Qt of the LibPack 12.5.1:
OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24272 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: 27b568e4e474f8b020203a7190b4db2afe5c8cc5
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: German/Germany (de_DE)
I carefully checked that there were no traces of former FC versions. I also cleaned the registry from all FC-related entries.
Then I installed FC 0.19 so I get the default settings and with them FC looks horrible. Here are two examples:
So everything is huge.
But all other apps ion this PC scale nicely. For example here is a screenshot of LibreOffice:
Re: Improve support of high DPI displays
For the records: here are screenshots from another Laptop that has a 13.3'' inch display (the one with smallest screen I could find). And here FC 0.19 looks fine (screen resolution 1366 x 768):
Re: Improve support of high DPI displays
Says who? The Qt or the FreeCAD marketing department?vanuan wrote: ↑Mon Mar 08, 2021 7:43 am In older Qt version there's an option of setting environment variable QT_SCALE_FACTOR. Maybe you have it set to a large value?
That was required for old Qt versions, but not anymore.
https://doc.qt.io/qt-5/highdpi.html
4k 15.6" HiDPI Screen here. Starting the AppImage with no Qt sauce results in humongous "many things" - as in menu fonts etc. Much like uwe has shown and much according to my own experience in the past.
Starting the appImg with
Code: Select all
QT_SCALE_FACTOR=0.7 ./FreeCAD_weekly-builds-24693-Linux-Conda_glibc2.12-x86_64.AppImage
Code: Select all
642652 112252 84004 R 100.0 0.7 0:45.94 /tmp/.mount_FreeCAFqyEg7/usr/bin/freecad
Code: Select all
^C^Z
[1]+ Stopped QT_SCALE_FACTOR=0.7 ./FreeCAD_weekly-builds-24693-Linux-Conda_glibc2.12-x86_64.AppImage
$ kill -9 %1
[1]+ Killed QT_SCALE_FACTOR=0.7 ./FreeCAD_weekly-builds-24693-Linux-Conda_glibc2.12-x86_64.AppImage
edit:
In fact, any scale factor != 1 will result in the hang. A scale factor of 1 will not, but is - obviously - useless.
QT_AUTO_SCREEN_SCALE_FACTOR=1 will also not result in a hang (hooray!), but does not change the frankenstein behavior.
(head too big, hands too small, ...)
Re: Improve support of high DPI displays
Please change your tone. I understand your annoyance. But it doesn't help.
It would be much more productive if you could describe the issue carefully, specify your scale factor in display settings and screenshots of how it looks compared to other GNOME apps. Also you didn't provide Qt version to make any claim on whether any environment variables required.