QWindows11Style: Fix sorting arrows in headers
Fixes: QTBUG-126345 Change-Id: Ifb0bb46329a909fd113318f61ca37ba01f4d873d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit 81642477d979e00f9507df37184e75d9ed98ee2f)
This commit is contained in:
parent
cd48b781d1
commit
61c67cf499
@ -823,6 +823,18 @@ void QWindows11Style::drawPrimitive(PrimitiveElement element, const QStyleOption
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case PE_IndicatorHeaderArrow:
|
||||||
|
if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) {
|
||||||
|
painter->setPen(header->palette.text().color());
|
||||||
|
painter->setFont(assetFont);
|
||||||
|
QRectF rect = option->rect;
|
||||||
|
if (header->sortIndicator & QStyleOptionHeader::SortUp) {
|
||||||
|
painter->drawText(rect,Qt::AlignCenter,"\uE96D");
|
||||||
|
} else if (header->sortIndicator & QStyleOptionHeader::SortDown) {
|
||||||
|
painter->drawText(rect,Qt::AlignCenter,"\uE96E");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
case PE_IndicatorCheckBox:
|
case PE_IndicatorCheckBox:
|
||||||
{
|
{
|
||||||
QNumberStyleAnimation* animation = qobject_cast<QNumberStyleAnimation*>(d->animation(option->styleObject));
|
QNumberStyleAnimation* animation = qobject_cast<QNumberStyleAnimation*>(d->animation(option->styleObject));
|
||||||
@ -1812,6 +1824,10 @@ QRect QWindows11Style::subElementRect(QStyle::SubElement element, const QStyleOp
|
|||||||
ret = QWindowsVistaStyle::subElementRect(element, option, widget);
|
ret = QWindowsVistaStyle::subElementRect(element, option, widget);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case QStyle::SE_HeaderLabel:
|
||||||
|
case QStyle::SE_HeaderArrow:
|
||||||
|
ret = QCommonStyle::subElementRect(element, option, widget);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
ret = QWindowsVistaStyle::subElementRect(element, option, widget);
|
ret = QWindowsVistaStyle::subElementRect(element, option, widget);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user