From 10441162c4323d6e41f54425a8d7641fda18f711 Mon Sep 17 00:00:00 2001 From: ailurux Date: Thu, 28 Mar 2024 15:36:16 +1100 Subject: [PATCH] Fix for adding multiple styles with the same key --- src/ui/themes.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ui/themes.cpp b/src/ui/themes.cpp index 88f45b1b..b13f226a 100644 --- a/src/ui/themes.cpp +++ b/src/ui/themes.cpp @@ -70,6 +70,7 @@ void Theme::Callback(lv_obj_t* obj) { void Theme::ApplyStyle(lv_obj_t* obj, std::string style_key) { if (auto search = style_map.find(style_key); search != style_map.end()) { for (const auto& pair : search->second) { + lv_obj_remove_style(obj, pair.second, pair.first); lv_obj_add_style(obj, pair.second, pair.first); } }