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

QStyle::PM_FocusFrameHMargin is incorrectly applied on Mac OS X.

    XMLWordPrintable

Details

    • macOS

    Description

      QStyle's PM_FocusFrameHMargin is currently used for two different
      purposes:
      1. QItemDelegate's keyboard focus rectangle that surrounds individual
      list items
      2. QFocusFrame's keyboard focus rectangle that surrounds QLineEdit or
      other QWidget instances.

      On Mac OS X, purpose #1/QItemDelegate is 0 pixels, purpose #2/
      QFocusFrame is 4 pixels. Since there is only one constant for
      PM_FocusFrameHMargin, we get stuck with the single value of 4 pixels,
      and our QItemDelegate-drawn list items end up with too much whitespace
      between tree control, icon, and text.

      PM_FocusFrameHMargin should probably be renamed to
      PM_ItemFocusFrameHMargin (and its sibling PM_FocusFrameVMargin
      similarly renamed to PM_ItemFocusFrameVMargin). Both would return 0
      for styles that do not display focus rects around list items (such as
      Mac OS X, even some WinXP themes).

      PM_FocusFrameHMargin needs to be split into two separate values, one
      for QItemDelegate, and one for QFocusRect. That would decouple Mac OS
      X's 4 pixel wide big blue box from item list spacing.

      Attachments

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

        Activity

          People

            bachewii Jens
            dettman Dean Dettman (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes