Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.4.1
-
None
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.