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. Fixes: QTBUG-131955 Change-Id: I65f8e2afd1c2fb310d6a23b1405a920adcbf42c3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 298e8119222174cfb253272699e7fd90c1abf255) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
4e94132fb0
commit
a223eca4ae
@ -4240,12 +4240,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