[BUG?] Cropped icons

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
User avatar
bill
Posts: 370
Joined: Fri Jan 09, 2015 9:25 pm

Re: [BUG?] Cropped icons

Post by bill » Thu May 24, 2018 12:01 pm

Were you aware of this problem: https://forum.freecadweb.org/viewtopic. ... 0&start=20
ssnoyesmaybe.png
ssnoyesmaybe.png (67.46 KiB) Viewed 557 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. :?

pablogil
Posts: 705
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: [BUG?] Cropped icons

Post by pablogil » Thu May 24, 2018 3:36 pm

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
Posts: 8364
Joined: Mon Dec 12, 2011 4:45 pm

Re: [BUG?] Cropped icons

Post by triplus » 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?

pablogil
Posts: 705
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: [BUG?] Cropped icons

Post by pablogil » Fri Jun 15, 2018 3:34 pm

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 476 times
Any clue then?
Thanks
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here

triplus
Posts: 8364
Joined: Mon Dec 12, 2011 4:45 pm

Re: [BUG?] Cropped icons

Post by triplus » 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?

pablogil
Posts: 705
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: [BUG?] Cropped icons

Post by pablogil » Thu Jun 21, 2018 5:46 am

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 422 times
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here

triplus
Posts: 8364
Joined: Mon Dec 12, 2011 4:45 pm

Re: [BUG?] Cropped icons

Post by triplus » Sat Jun 23, 2018 1:51 pm

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
Posts: 8364
Joined: Mon Dec 12, 2011 4:45 pm

Re: [BUG?] Cropped icons

Post by triplus » Thu Dec 20, 2018 9:33 pm

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
Posts: 8364
Joined: Mon Dec 12, 2011 4:45 pm

Re: [BUG?] Cropped icons

Post by triplus » Sun Dec 30, 2018 4:26 pm

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")

Post Reply