Simplify conversion from temperature to color in OptionsView

This commit is contained in:
catsoften 2023-04-13 21:05:11 -04:00 committed by Tamás Bálint Misius
parent a715f5d71a
commit 561fc17431

View File

@ -437,8 +437,7 @@ void OptionsView::UpdateAmbientAirTempPreview(float airTemp, bool isValid)
{
if (isValid)
{
auto c = RGB<uint8_t>::Unpack(HeatToColour(airTemp));
ambientAirTempPreview->Appearance.BackgroundInactive = ui::Colour(c.Red, c.Green, c.Blue);
ambientAirTempPreview->Appearance.BackgroundInactive = RGB<uint8_t>::Unpack(HeatToColour(airTemp)).WithAlpha(0xFF);
ambientAirTempPreview->SetText("");
}
else