From 47016765b3d63afac80b2220cb78b2ff0a42db8c Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 20 Apr 2022 17:01:25 +0200 Subject: [PATCH] [welcome] Fill backgrounds of failed requirements --- src/modules/welcome/checker/ResultDelegate.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/modules/welcome/checker/ResultDelegate.cpp b/src/modules/welcome/checker/ResultDelegate.cpp index 60f67849a..420ece812 100644 --- a/src/modules/welcome/checker/ResultDelegate.cpp +++ b/src/modules/welcome/checker/ResultDelegate.cpp @@ -36,15 +36,24 @@ paintRequirement( QPainter* painter, const QStyleOptionViewItem& option, const Q CalamaresUtils::ImageType statusImage = CalamaresUtils::StatusOk; painter->setPen( QColorConstants::Black ); - if ( index.data( Calamares::RequirementsModel::Satisfied ).toBool() ) {} + if ( index.data( Calamares::RequirementsModel::Satisfied ).toBool() ) + { + painter->fillRect( textRect, option.palette.window().color() ); + } else { if ( index.data( Calamares::RequirementsModel::Mandatory ).toBool() ) { + QColor bgColor = option.palette.window().color(); + bgColor.setHsv( 0, 64, bgColor.value() ); + painter->fillRect( option.rect, bgColor ); statusImage = CalamaresUtils::StatusError; } else { + QColor bgColor = option.palette.window().color(); + bgColor.setHsv( 60, 64, bgColor.value() ); + painter->fillRect( option.rect, bgColor ); statusImage = CalamaresUtils::StatusWarning; } }