Fixed an issue where some theme properties did not load correctly for the clock element

This commit is contained in:
Leon Styhre 2025-02-26 18:41:25 +01:00
parent 331a33be74
commit 11ee0ab262

View file

@ -159,7 +159,6 @@ void DateTimeComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
unsigned int properties)
{
using namespace ThemeFlags;
GuiComponent::applyTheme(theme, view, element, properties);
std::string elementType {"datetime"};
std::string componentName {"DateTimeComponent"};
@ -179,6 +178,8 @@ void DateTimeComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
setFormat("%H:%M");
}
GuiComponent::applyTheme(theme, view, element, properties);
const ThemeData::ThemeElement* elem {theme->getElement(view, element, elementType)};
if (!elem)
return;