mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
Use old ProjectItem highlight on Windows styles
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
40d1dccb9b
commit
81f34be053
1 changed files with 9 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue