Skip to content

Commit

Permalink
fix(color): Ensure all items are updated on theme change in user inte…
Browse files Browse the repository at this point in the history
…rface settings (EdgeTX#4084)
  • Loading branch information
philmoz authored Sep 22, 2023
1 parent d43f71b commit 9bec772
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions radio/src/gui/colorlcd/screen_user_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ class ThemeView : public FormWindow
padAll(0);
setFlexLayout(LV_FLEX_FLOW_COLUMN, 0);

update();
}

void update()
{
auto tp = ThemePersistance::instance();
auto theme = tp->getCurrentTheme();

Expand Down Expand Up @@ -166,7 +161,10 @@ void ScreenUserInterfacePage::build(FormWindow* window)
tp->applyTheme(value);
tp->setDefaultTheme(value);
TabsGroup::refreshTheme();
themeView->update();

// Force redraw to ensure all items are updated with new theme colors
window->clear();
build(window);
});

grid.setColSpan(2);
Expand Down

0 comments on commit 9bec772

Please sign in to comment.