Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-13318

QCleanLooksStyle doesn't fully support QProxyStyle

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 4.7.1
    • 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

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            bachewii Jens
            finetjul Julien Finet
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes