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

Blurry checkboxes on Mac OS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P2: Important
    • None
    • 5.15.1
    • Widgets: Styles
    • None
    • Mac OS 11.1, ARM
    • macOS

    Description

      In Mac style QCheckBox-es with attribute Qt::WA_MacSmallSize set are blurred and shifted by 1 px vertically. Please see the attachments for comparison between Qt 5.4.1 (correctly drawn) and 5.15.1 (incorrect).

      The problem is caused by the following code in qmacstyle_mac.mm:

      const auto vOffset = [=]

      { // As measured if (cs == QStyleHelper::SizeMini) return ct == QMacStylePrivate::Button_CheckBox ? -0.5 : 0.5; return cs == QStyleHelper::SizeSmall ? 0.5 : 0.0; }

      ();

      Setting vOffset to 0.0 fixes the issue.

      Attachments

        1. 5.15.1.png
          5.15.1.png
          6 kB
        2. 5.4.1.png
          5.4.1.png
          4 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tpochep Timur Pocheptsov
            skoulik Sergei Kulik
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes