Fusion style: TabBar: Use common style to draw a close button

Custom tab bar's close button looks outdated in Fusion style.
Common style's close button looks much better.

Task-number: QTBUG-94752
Change-Id: I9e9aba4a5cd1ee0d3b7fc230306c5e052b6ba3bd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
This commit is contained in:
Nodir Temirkhodjaev 2021-06-23 16:53:01 +03:00
parent cdb18fc1e5
commit 424243ab17

View File

@ -990,17 +990,6 @@ void QFusionStyle::drawPrimitive(PrimitiveElement elem,
case PE_FrameStatusBarItem:
break;
case PE_IndicatorTabClose:
{
Q_D(const QFusionStyle);
if (d->tabBarcloseButtonIcon.isNull())
d->tabBarcloseButtonIcon = proxy()->standardIcon(SP_DialogCloseButton, option, widget);
if ((option->state & State_Enabled) && (option->state & State_MouseOver))
proxy()->drawPrimitive(PE_PanelButtonCommand, option, painter, widget);
QPixmap pixmap = d->tabBarcloseButtonIcon.pixmap(QSize(16, 16), painter->device()->devicePixelRatio(), QIcon::Normal, QIcon::On);
proxy()->drawItemPixmap(painter, option->rect, Qt::AlignCenter, pixmap);
}
break;
case PE_PanelMenu: {
painter->save();
const QBrush menuBackground = option->palette.base().color().lighter(108);