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

Small indeterminate QProgressBar painted incorrectly on Vista+

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 4.8.x, 5.5.1, 5.6.0 Beta
    • GUI: Look'n'Feel
    • None

    Description

      QWindowsVistaStyle paints indeterminate QProgressBars incorrectly if they happen to be smaller than the animated part. See the attached screenshot and code for an example. The green part is cut off and a black to transparent gradient shows.

      The style always paints (in QWindowsVistaStyle::drawControl for CE_ProgressBarContents) the animated part in a 120x14 (14x120 for vertical) rectangle by compositing a transparent-black-transparent gradient with the native theme element. But the native theme element is clipped to the actual progress bar length (theme.rect = option->rect;). If the bar is smaller than 120 the native part is cut off and the gradient shows.

      This bug seems to be present in all Qt versions, even the dev branch.

      Attachments

        1. qprogressbar-bug.png
          qprogressbar-bug.png
          1 kB
        2. qtbug51266_orig.zip
          1 kB
        3. qtprogressbar-bug.cpp
          0.3 kB
        For Gerrit Dashboard: QTBUG-51266
        # Subject Branch Project Status CR V

        Activity

          People

            bachewii Jens
            nrieck nrieck
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes