Windows11Style/WindowsVistaStyle: don't modify SE_ItemViewItemDecoration
The windowsvista style increased the width for SE_ItemViewItemDecoration by 4 pixels which lead to a non-square area for the decoration item. Since the item is painted centered on the given area, this did not change anything for squared pixmap-based icons. But when using a svg, the image is automatically stretched to fill the complete area. Therefore a svg is not painted quadratic but stretched which is not what a user expects. Looking for other usages of SE_ItemViewItemDecoration did not reveal another usecase for this so it should be safe to remove the handling within windowsvista style. Pick-to: 6.9 Fixes: QTBUG-131955 Change-Id: I65f8e2afd1c2fb310d6a23b1405a920adcbf42c3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
fb7670f193
commit
298e811922
@ -4244,12 +4244,6 @@ QRect QWindowsVistaStyle::subElementRect(SubElement element, const QStyleOption
|
||||
rect = QCommonStyle::subElementRect(SE_ProgressBarGroove, option, widget);
|
||||
break;
|
||||
|
||||
case SE_ItemViewItemDecoration:
|
||||
rect = QWindowsStyle::subElementRect(element, option, widget);
|
||||
if (qstyleoption_cast<const QStyleOptionViewItem *>(option))
|
||||
rect.adjust(-2, 0, 2, 0);
|
||||
break;
|
||||
|
||||
case SE_ItemViewItemFocusRect:
|
||||
rect = QWindowsStyle::subElementRect(element, option, widget);
|
||||
if (const QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(option)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user