From 8a80ccae3a13b10e5f77f0b3f32347ce8cd9a258 Mon Sep 17 00:00:00 2001 From: Trial97 Date: Sat, 7 Jun 2025 09:10:03 +0300 Subject: [PATCH] chore: move oppacity after checkbox draw Signed-off-by: Trial97 --- launcher/ui/widgets/ProjectItem.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/launcher/ui/widgets/ProjectItem.cpp b/launcher/ui/widgets/ProjectItem.cpp index 91cf0956f..b6701535d 100644 --- a/launcher/ui/widgets/ProjectItem.cpp +++ b/launcher/ui/widgets/ProjectItem.cpp @@ -20,9 +20,6 @@ void ProjectItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem& o auto isChecked = opt.checkState == Qt::Checked; auto isSelected = option.state & QStyle::State_Selected; - if (!isSelected && !isChecked && isInstalled) { - painter->setOpacity(0.4); // Fade out the entire item - } const QStyle* style = opt.widget == nullptr ? QApplication::style() : opt.widget->style(); auto rect = opt.rect; @@ -39,6 +36,9 @@ void ProjectItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem& o rect.setX(checkboxOpt.rect.right()); } + if (!isSelected && !isChecked && isInstalled) { + painter->setOpacity(0.4); // Fade out the entire item + } // The default icon size will be a square (and height is usually the lower value). auto icon_width = rect.height(), icon_height = rect.height(); int icon_x_margin = (rect.height() - icon_width) / 2;