From 81f34be053e95f63bdbadb64f1baf723a4eaee4d Mon Sep 17 00:00:00 2001 From: TheKodeToad Date: Thu, 11 Dec 2025 15:42:53 +0000 Subject: [PATCH] Use old ProjectItem highlight on Windows styles Signed-off-by: TheKodeToad --- launcher/ui/widgets/ProjectItem.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/launcher/ui/widgets/ProjectItem.cpp b/launcher/ui/widgets/ProjectItem.cpp index b6701535d..2fd5c97c2 100644 --- a/launcher/ui/widgets/ProjectItem.cpp +++ b/launcher/ui/widgets/ProjectItem.cpp @@ -24,10 +24,17 @@ void ProjectItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem& o 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()); + } if (opt.features & QStyleOptionViewItem::HasCheckIndicator) { QStyleOptionViewItem checkboxOpt = makeCheckboxStyleOption(opt, style);