Simplify conversion from temperature to color in OptionsView
This commit is contained in:
parent
a715f5d71a
commit
561fc17431
@ -437,8 +437,7 @@ void OptionsView::UpdateAmbientAirTempPreview(float airTemp, bool isValid)
|
|||||||
{
|
{
|
||||||
if (isValid)
|
if (isValid)
|
||||||
{
|
{
|
||||||
auto c = RGB<uint8_t>::Unpack(HeatToColour(airTemp));
|
ambientAirTempPreview->Appearance.BackgroundInactive = RGB<uint8_t>::Unpack(HeatToColour(airTemp)).WithAlpha(0xFF);
|
||||||
ambientAirTempPreview->Appearance.BackgroundInactive = ui::Colour(c.Red, c.Green, c.Blue);
|
|
||||||
ambientAirTempPreview->SetText("");
|
ambientAirTempPreview->SetText("");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user