Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.6.3
-
None
-
Ubuntu 10.04
-
1f5d88dd327be635966ed9e3811c8803a163b2a4
Description
When using QCleanLooksStyle in a QProxyStyle, CleanLooks doesn't support custom PM_SliderThickness nor PM_SliderLength
To reproduce:
subclass QProxyStyle::pixelMetric(...) for the metric QStyle::PM_SliderLength. Set QCleanLooksStyle as the base style for the proxy
-> the slider handle size is not changed
Suggested fix:
In
"QRect QCleanlooksStyle::subControlRect(ComplexControl control, const QStyleOptionComplex *option, SubControl subControl, const QWidget *widget) const",
replace
rect.setHeight(pixelMetric(PM_SliderThickness));
rect.setWidth(pixelMetric(PM_SliderLength));
...
rect.setWidth(pixelMetric(PM_SliderThickness));
rect.setHeight(pixelMetric(PM_SliderLength));
by:
rect.setHeight(proxy()->pixelMetric(PM_SliderThickness));
rect.setWidth(proxy()->pixelMetric(PM_SliderLength));
...
rect.setWidth(proxy()->pixelMetric(PM_SliderThickness));
rect.setHeight(proxy()->pixelMetric(PM_SliderLength));
Note: there is one more missing style()->pixelMetric(...) at line qcleanlooksstyle.cpp:2161