Fixed an issue where SVG rating components would not render immediately.

This commit is contained in:
Leon Styhre 2021-03-13 11:46:19 +01:00
parent 652adc41d8
commit b12a68603d

View file

@ -210,7 +210,6 @@ bool RatingComponent::input(InputConfig* config, Input input)
void RatingComponent::applyTheme(const std::shared_ptr<ThemeData>& theme, void RatingComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
const std::string& view, const std::string& element, unsigned int properties) const std::string& view, const std::string& element, unsigned int properties)
{ {
GuiComponent::applyTheme(theme, view, element, properties);
using namespace ThemeFlags; using namespace ThemeFlags;
const ThemeData::ThemeElement* elem = theme->getElement(view, element, "rating"); const ThemeData::ThemeElement* elem = theme->getElement(view, element, "rating");
@ -237,6 +236,8 @@ void RatingComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
mUnfilledColor = mColorShift; mUnfilledColor = mColorShift;
} }
GuiComponent::applyTheme(theme, view, element, properties);
if (imgChanged) if (imgChanged)
onSizeChanged(); onSizeChanged();
} }