QCommonStyle::sizeFromContents(): Increase height of CT_ItemViewItem
Prevent icons from overlapping by adding a small margin (as does QWindowsVistaStyle) should the total height equal the icon size. Task-number: QTBUG-52353 Change-Id: Iad0b7374a22129ee92ff3cc4479118c10db377aa Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>bb10
parent
58e1465cb0
commit
4499667799
|
|
@ -4872,6 +4872,8 @@ QSize QCommonStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
|
|||
QRect decorationRect, displayRect, checkRect;
|
||||
d->viewItemLayout(vopt, &checkRect, &decorationRect, &displayRect, true);
|
||||
sz = (decorationRect|displayRect|checkRect).size();
|
||||
if (decorationRect.isValid() && sz.height() == decorationRect.height())
|
||||
sz.rheight() += 2; // Prevent icons from overlapping.
|
||||
}
|
||||
break;
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
|
|
|
|||
Loading…
Reference in New Issue