Toolbar icon size 24px?

A forum for research and development of the user interface of FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Toolbar icon size 24px?

Post by sgrogan »

agryson wrote:OK, my test-build works fine. Could all interested and able parties please pull and test?
Works great. Everything behaves as advertised.
"fight the good fight"
User avatar
agryson
Posts: 463
Joined: Wed Nov 23, 2016 8:30 am
Location: Bordeaux, France
Contact:

Re: Toolbar icon size 24px?

Post by agryson »

sgrogan wrote:
agryson wrote:OK, my test-build works fine. Could all interested and able parties please pull and test?
Works great. Everything behaves as advertised.
Perfect, thank you for testing! I'll have a pull request submitted by this evening.
User avatar
agryson
Posts: 463
Joined: Wed Nov 23, 2016 8:30 am
Location: Bordeaux, France
Contact:

Re: Toolbar icon size 24px?

Post by agryson »

wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Toolbar icon size 24px?

Post by wmayer »

Now if a change is made in the property editor and then a change is made in edit prefs the value reverts to 16 px, first in the list?
Just for clarification: what are talking about is not the property editor but the parameter editor, the thing that looks like the Windows registry.
I am curious though what causes the default to be 30px on some systems.
This is determined by Qt and depends on system settings. First it tries to get this number from the platform theme and if none is set then it multiplies 24.0 with the factor (dpi/96.0). The dpi is determined by the current screen resolution.

If someone has Qt debug libs he could try to track what happens internally:

Code: Select all

from PySide import QtGui
s=QtGui.qApp.style()
s.metaObject().className()

s.pixelMetric(s.PM_ToolBarIconSize)
s.pixelMetric(s.PM_SmallIconSize)
s.pixelMetric(s.PM_LargeIconSize)
User avatar
agryson
Posts: 463
Joined: Wed Nov 23, 2016 8:30 am
Location: Bordeaux, France
Contact:

Re: Toolbar icon size 24px?

Post by agryson »

wmayer wrote:This is determined by Qt and depends on system settings. First it tries to get this number from the platform theme and if none is set then it multiplies 24.0 with the factor (dpi/96.0). The dpi is determined by the current screen resolution.
That's what I thought but we had similar systems with similar screens giving varying results.
I'll try to do what you suggest to track down the root issue, I'd like to support HDPI screens better.
Post Reply