[BUG?] Cropped icons

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
pablogil
Posts: 882
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: [BUG?] Cropped icons

Post by pablogil »

triplus wrote: Wed Sep 04, 2019 9:32 am Hi @pablogil

Can you confirm this is still an issue, when using latest FreeCAD 0.19 DMG?
Give me some days, I don't have the external monitor close to my actual home so I need a few days to check it out.
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
noel.rivas
Posts: 1
Joined: Thu Jan 02, 2020 11:38 pm

Re: [BUG?] Cropped icons

Post by noel.rivas »

Hi @triplus,

I can confirm that this is still an issue. I just installed 0.19-19107: the icons look cropped on my external monitor, and they look fine on my main monitor. This is on a Macbook Pro 13" with retina display.
User avatar
pablogil
Posts: 882
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: [BUG?] Cropped icons

Post by pablogil »

pablogil wrote: Wed Sep 04, 2019 11:29 am
triplus wrote: Wed Sep 04, 2019 9:32 am Hi @pablogil

Can you confirm this is still an issue, when using latest FreeCAD 0.19 DMG?
Give me some days, I don't have the external monitor close to my actual home so I need a few days to check it out.
I also had the time to check it out this Christmas and the bug is still present... :(
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: [BUG?] Cropped icons

Post by triplus »

This is an upstream Qt issue. A while back we have enabled AA_UseHighDpiPixmaps attribute in FreeCAD to get nice icons on HiDPI displays. In addition there is an icon theme (FreeCAD-default) embedded and used in FreeCAD by default. There needs to be a third ingredient and that is a dual display workspace, where each display has a different scale factor set. If all this conditions are true, the mentioned issue can be observed. Until the issue gets fixed in Qt, and as we won't be turning AA_UseHighDpiPixmaps attribute to off by default, to mitigate the issue i have created a PR, basically i left only one icon (screenshot command) in the embedded demo icon theme pack. No icons from an icon theme will get used on toolbars, hence the issue should be resolved.

P.S. For people using the IconThemes module (not legacy), the issue will still persist in such scenario. Until the issue gets fixed in Qt there is some manual control avaliable:

Run when FreeCAD is located on HiDPI display:

Code: Select all

from PySide import QtGui, QtCore
QtGui.QApplication.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps, True)
Run when FreeCAD is located on regular display:

Code: Select all

from PySide import QtGui, QtCore
QtGui.QApplication.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps, False)
P.S. Or just run the last code snippet once and give up a bit more crisp icons on HiDPI display.
Post Reply