[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
bill
Posts: 376
Joined: Fri Jan 09, 2015 9:25 pm

Re: [BUG?] Cropped icons

Post by bill »

Were you aware of this problem: https://forum.freecadweb.org/viewtopic. ... 0&start=20
ssnoyesmaybe.png
ssnoyesmaybe.png (67.46 KiB) Viewed 2294 times
:idea:

I have since come to realize that the problem TOGGLES between Daily and 17 depending on where you set the styles last; even though they are displayed. :?
User avatar
pablogil
Posts: 881
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: [BUG?] Cropped icons

Post by pablogil »

bill wrote: Thu May 24, 2018 12:01 pm Were you aware of this problem: https://forum.freecadweb.org/viewtopic. ... 0&start=20

ssnoyesmaybe.png

:idea:

I have since come to realize that the problem TOGGLES between Daily and 17 depending on where you set the styles last; even though they are displayed. :?
Hi bill,

No, I wasn't aware of this problem but it seems like it's not the stylesheet but the config file... doesn't it?
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 »

I looked in the code and to be honest i don't see anything special or obvious on why File and View toolbars should behave any different. What about the Macro toolbar. Does it work as expected? Once the issue occurs if you look under the File -> New and View -> Standard views global menu entries. Are the icons normal there?
User avatar
pablogil
Posts: 881
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: [BUG?] Cropped icons

Post by pablogil »

triplus wrote: Mon Jun 11, 2018 7:43 am I looked in the code and to be honest i don't see anything special or obvious on why File and View toolbars should behave any different. What about the Macro toolbar. Does it work as expected? Once the issue occurs if you look under the File -> New and View -> Standard views global menu entries. Are the icons normal there?
Sorry, I missed this post...
Yes, you are right, it also happens with the Macro toolbar. I haven't report about it because I always have it disabled...
Here is what I get:
toolbar.png
toolbar.png (85.87 KiB) Viewed 2213 times
Any clue then?
Thanks
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 »

pablogil wrote: Fri Jun 15, 2018 3:34 pm Any clue then?
Thanks
Thanks for the feedback. One thing i am still wondering about. Once the issue occurs. If you take a look under (global) menu View -> Standard views. Are the view related icons OK or resized?
User avatar
pablogil
Posts: 881
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: [BUG?] Cropped icons

Post by pablogil »

triplus wrote: Mon Jun 18, 2018 9:12 am
pablogil wrote: Fri Jun 15, 2018 3:34 pm Any clue then?
Thanks
Thanks for the feedback. One thing i am still wondering about. Once the issue occurs. If you take a look under (global) menu View -> Standard views. Are the view related icons OK or resized?
Hi,
They are OK:
views.png
views.png (211.4 KiB) Viewed 2159 times
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 »

Thanks for the info. It helps narrowing down the potential places on where to look for clues. Will take another look in the following days and hopefully something will stand out.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: [BUG?] Cropped icons

Post by triplus »

Note that i didn't forget about this issue. It's just i didn't find anything obvious, and due to not having such display setup, no real testing could be done:

https://forum.freecadweb.org/viewtopic. ... 37#p275369

While answering the other question, i realized, i might not need a macOS and external retina display at all. Maybe similar issue will be reproducible on Linux and on two screens having different resolutions. Will try to test this use case over the weekend and report back.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: [BUG?] Cropped icons

Post by triplus »

OK i was able to reproduce the issue on Linux, when using two displays, each having different (Qt) scale factor set. The problem is related to icons loaded from the icon theme. Such icons are scaled up to the display using the biggest scale factor, and don't adapt after anymore. In the following days i will do more testing, independently of FreeCAD, to first confirm this is a Qt related issue. Once that gets confirmed, and as the next version of IconThemes module will use such icon theme approach, i will likely report this issue to the upstream Qt devs. Hopefully they will be prepared to fix it.

For now this is what you can do to remove the issue. Copy paste the snippet in FreeCAD Python console:

Code: Select all

p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Bitmaps/Theme")
p.SetString("Name", "None")
After FreeCAD gets restarted the issue with the icons should be resolved.

To revert to defaults:

Code: Select all

p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Bitmaps/Theme")
p.RemString("Name")
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: [BUG?] Cropped icons

Post by triplus »

Hi @pablogil

Can you confirm this is still an issue, when using latest FreeCAD 0.19 DMG?
Post Reply