Fixed an issue where the text background opacity was not calculated correctly.

This commit is contained in:
Leon Styhre 2022-09-25 10:02:24 +02:00
parent 748969e34d
commit fcbe612a0b

View file

@ -102,9 +102,6 @@ void TextComponent::setOpacity(float opacity)
float textOpacity {opacity * mColorOpacity}; float textOpacity {opacity * mColorOpacity};
mColor = (mColor & 0xFFFFFF00) | static_cast<unsigned char>(textOpacity * 255.0f); mColor = (mColor & 0xFFFFFF00) | static_cast<unsigned char>(textOpacity * 255.0f);
float textBackgroundOpacity {opacity * mBgColorOpacity};
mBgColor = (mBgColor & 0xFFFFFF00) | static_cast<unsigned char>(textBackgroundOpacity * 255.0f);
onColorChanged(); onColorChanged();
GuiComponent::setOpacity(opacity); GuiComponent::setOpacity(opacity);