mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-26 08:58:22 -04:00
Merge pull request #1274 from bill-auger/patch-requirements-fail-bgcolor
replace hard-coded bg color of requirements failure notice with relative tint
This commit is contained in:
commit
2fefa53301
1 changed files with 9 additions and 3 deletions
|
@ -71,11 +71,14 @@ ResultsListWidget::init( const Calamares::RequirementsList& checkEntries )
|
||||||
allChecked = false;
|
allChecked = false;
|
||||||
if ( entry.mandatory )
|
if ( entry.mandatory )
|
||||||
requirementsSatisfied = false;
|
requirementsSatisfied = false;
|
||||||
|
|
||||||
ciw->setAutoFillBackground( true );
|
ciw->setAutoFillBackground( true );
|
||||||
QPalette pal( ciw->palette() );
|
QPalette pal( ciw->palette() );
|
||||||
pal.setColor( QPalette::Background, Qt::white );
|
QColor bgColor = pal.window().color().value();
|
||||||
|
int bgHue = ( entry.satisfied ) ? bgColor.hue() : ( entry.mandatory ) ? 0 : 60;
|
||||||
|
bgColor.setHsv( bgHue, 64, bgColor.value() );
|
||||||
|
pal.setColor( QPalette::Window, bgColor );
|
||||||
ciw->setPalette( pal );
|
ciw->setPalette( pal );
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,7 +199,10 @@ ResultsListWidget::showDetailsDialog( const Calamares::RequirementsList& checkEn
|
||||||
|
|
||||||
ciw->setAutoFillBackground( true );
|
ciw->setAutoFillBackground( true );
|
||||||
QPalette pal( ciw->palette() );
|
QPalette pal( ciw->palette() );
|
||||||
pal.setColor( QPalette::Background, Qt::white );
|
QColor bgColor = pal.window().color().value();
|
||||||
|
int bgHue = ( entry.satisfied ) ? bgColor.hue() : ( entry.mandatory ) ? 0 : 60;
|
||||||
|
bgColor.setHsv( bgHue, 64, bgColor.value() );
|
||||||
|
pal.setColor( QPalette::Window, bgColor );
|
||||||
ciw->setPalette( pal );
|
ciw->setPalette( pal );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue