UI messed up in latest weekly Appimage

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
ifohancroft
Posts: 205
Joined: Fri May 31, 2019 11:25 pm
Location: Sofia, Bulgaria
Contact:

UI messed up in latest weekly Appimage

Post by ifohancroft »

As can be seen here https://youtu.be/M3rtcglKP9U the UI of the latest weekly AppImage is messed up.

Code: Select all

OS: Manjaro Linux (MATE/mate)
Word size of FreeCAD: 64-bit
Version: 0.21.29865 (Git) AppImage
Build type: Release
Branch: master
Hash: fb5c731847398c5bfbc37468ba851e70860a86d5
Python 3.10.5, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.2
Locale: English/United States (en_US)
I have removed my configs and stuff to make sure they aren't causing the problem.

Bug report: https://github.com/FreeCAD/FreeCAD-Bundle/issues/130
Last edited by ifohancroft on Tue Aug 02, 2022 1:38 am, edited 2 times in total.
I like making, breaking and modding stuff, using a soldering iron, code or both. https://ifohancroft.com
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: UI messed up in latest weekly Appimage

Post by Kunda1 »

Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
ifohancroft
Posts: 205
Joined: Fri May 31, 2019 11:25 pm
Location: Sofia, Bulgaria
Contact:

Re: UI messed up in latest weekly Appimage

Post by ifohancroft »

Done!

Edited the original post to add a url to the bug report.
I like making, breaking and modding stuff, using a soldering iron, code or both. https://ifohancroft.com
User avatar
adrianinsaval
Veteran
Posts: 5534
Joined: Thu Apr 05, 2018 5:15 pm

Re: UI messed up in latest weekly Appimage

Post by adrianinsaval »

dpi issue? I've seen this type of situation reported before on xfce and mate systems and IIRC setting the dpi correctly solved the problem, I think there was a case where it was related to a graphics driver issue too so it's hard to diagnose.
User avatar
ifohancroft
Posts: 205
Joined: Fri May 31, 2019 11:25 pm
Location: Sofia, Bulgaria
Contact:

Re: UI messed up in latest weekly Appimage

Post by ifohancroft »

adrianinsaval wrote: Tue Aug 02, 2022 4:04 am dpi issue? I've seen this type of situation reported before on xfce and mate systems and IIRC setting the dpi correctly solved the problem, I think there was a case where it was related to a graphics driver issue too so it's hard to diagnose.
No, in my case it isn't DPI (or a theme, or a graphics driver) issue. I think it has something to do with either the current Python or Qt version or some sort of relationship between the two.
I like making, breaking and modding stuff, using a soldering iron, code or both. https://ifohancroft.com
User avatar
ifohancroft
Posts: 205
Joined: Fri May 31, 2019 11:25 pm
Location: Sofia, Bulgaria
Contact:

Re: UI messed up in latest weekly Appimage

Post by ifohancroft »

The bug is still present in today's AppImage as well:

Code: Select all

OS: Manjaro Linux (MATE/mate)
Word size of FreeCAD: 64-bit
Version: 0.21.29997 (Git) AppImage
Build type: Release
Branch: master
Hash: b52967d52ac46eff7c59e74d991f3f5b298944ef
Python 3.10.5, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.2
Locale: English/United States (en_US)
Installed mods: 
  * MechanicalKeyboards
  * sheetmetal 0.2.49
  * kicadStepUpMod 10.11.9
I like making, breaking and modding stuff, using a soldering iron, code or both. https://ifohancroft.com
tonyaimer
Posts: 239
Joined: Mon Sep 30, 2019 4:17 pm

Re: UI messed up in latest weekly Appimage

Post by tonyaimer »

For what it's worth

My Linux Mint seems to be working OK

My details

Code: Select all

OS: Linux Mint 20 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.21.29997 (Git) AppImage
Build type: Release
Branch: master
Hash: b52967d52ac46eff7c59e74d991f3f5b298944ef
Python 3.10.5, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.2
Locale: English/South Africa (en_ZA)
Installed mods: 
  * Help 1.0.3
Cant tell you what kind of graphics card I have or any other hardware details because I don't know.

Tony
User avatar
ifohancroft
Posts: 205
Joined: Fri May 31, 2019 11:25 pm
Location: Sofia, Bulgaria
Contact:

Re: UI messed up in latest weekly Appimage

Post by ifohancroft »

Long story short but I've found a workaround.
adrianinsaval wrote: Tue Aug 02, 2022 4:04 am dpi issue? I've seen this type of situation reported before on xfce and mate systems and IIRC setting the dpi correctly solved the problem, I think there was a case where it was related to a graphics driver issue too so it's hard to diagnose.
You were right. The workaround was indeed DPI related. Setting QT_FONT_DPI to 96 or QT_SCALE_FACTOR to 1 makes FreeCAD show up as expected.

I'm still hoping to be able to narrow down the possible causes and hopefully find the root issue so I won't be marking the post as solved for now.

tonyaimer wrote: Mon Aug 08, 2022 4:53 pm For what it's worth

My Linux Mint seems to be working OK

My details

Code: Select all

OS: Linux Mint 20 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.21.29997 (Git) AppImage
Build type: Release
Branch: master
Hash: b52967d52ac46eff7c59e74d991f3f5b298944ef
Python 3.10.5, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.2
Locale: English/South Africa (en_ZA)
Installed mods: 
  * Help 1.0.3
Cant tell you what kind of graphics card I have or any other hardware details because I don't know.

Tony
@tonyaimer
Thank you! Can you please check your environment variables (by executing `env` in terminal) and see if you have any QT related ones set and to what values? Perhaps QT_FONT_DPI or QT_SCALE_FACTOR or basically anything that starts with QT?
P.S. Cool! It seems we have tagging/mentions now!
I like making, breaking and modding stuff, using a soldering iron, code or both. https://ifohancroft.com
User avatar
adrianinsaval
Veteran
Posts: 5534
Joined: Thu Apr 05, 2018 5:15 pm

Re: UI messed up in latest weekly Appimage

Post by adrianinsaval »

I don't know if it has to be configured specifically for Qt though, IIRC there was someone that reported solving it by changing font dpi settings on xfce somewhere.
User avatar
ifohancroft
Posts: 205
Joined: Fri May 31, 2019 11:25 pm
Location: Sofia, Bulgaria
Contact:

Re: UI messed up in latest weekly Appimage

Post by ifohancroft »

adrianinsaval wrote: Thu Aug 11, 2022 9:46 pm I don't know if it has to be configured specifically for Qt though, IIRC there was someone that reported solving it by changing font dpi settings on xfce somewhere.
Yeah, sorry. I explained the short version. Basically, at least MATE has an option to automatically set QT Font DPI based on what's set in it (I am guessing XFCE does as well). It does so by setting an environment variable. However, since my monitors are actually 92DPI, MATE correctly sets the font dpi to 92, but FreeCAD wants it to be 96 for it to work for some reason. If I force the font DPI to 96 (while still having the option for MATE to sync QT's settings) and reboot, that sets it for QT as well and now it works. I tested this before but didn't know I had to reboot.

The whole issue is a deep rabbit hole though and I haven't yet found the root cause of the problem.
I like making, breaking and modding stuff, using a soldering iron, code or both. https://ifohancroft.com
Post Reply