Use old ProjectItem highlight on Windows styles (#4466)
This commit is contained in:
@@ -24,10 +24,17 @@ void ProjectItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem& o
|
|||||||
|
|
||||||
auto rect = opt.rect;
|
auto rect = opt.rect;
|
||||||
|
|
||||||
style->drawPrimitive(QStyle::PE_PanelItemViewItem, &opt, painter, opt.widget);
|
bool windows = style->objectName().startsWith("windows");
|
||||||
|
|
||||||
|
if (!windows)
|
||||||
|
style->drawPrimitive(QStyle::PE_PanelItemViewItem, &opt, painter, opt.widget);
|
||||||
|
|
||||||
|
if (isSelected) {
|
||||||
|
if (windows)
|
||||||
|
painter->fillRect(rect, opt.palette.highlight());
|
||||||
|
|
||||||
if (isSelected && style->objectName() != "windowsvista")
|
|
||||||
painter->setPen(opt.palette.highlightedText().color());
|
painter->setPen(opt.palette.highlightedText().color());
|
||||||
|
}
|
||||||
|
|
||||||
if (opt.features & QStyleOptionViewItem::HasCheckIndicator) {
|
if (opt.features & QStyleOptionViewItem::HasCheckIndicator) {
|
||||||
QStyleOptionViewItem checkboxOpt = makeCheckboxStyleOption(opt, style);
|
QStyleOptionViewItem checkboxOpt = makeCheckboxStyleOption(opt, style);
|
||||||
|
|||||||
Reference in New Issue
Block a user