Skip to content

Commit 37ce084

Browse files
committed
fix(UI): ensure that previous theme is fully invalidated when changing theme
chore(UI): update checked button border colour for retro theme
1 parent d2a2724 commit 37ce084

File tree

16 files changed

+6
-6
lines changed

16 files changed

+6
-6
lines changed

libraries/lvgl

src/UI/Styles/Styles.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,14 +251,11 @@ namespace UI::Themes
251251
s_currentTheme = const_cast<Theme*>(this);
252252

253253
lv_enable_style_refresh(true);
254-
lv_display_t* disp = lv_display_get_default();
255-
lv_area_t full_area = {
256-
0, 0, lv_display_get_horizontal_resolution(disp) - 1, lv_display_get_vertical_resolution(disp) - 1};
257-
lv_inv_area(disp, &full_area);
258254
{
259255
ZoneScopedN("Refreshing styles");
260-
lv_obj_refresh_style(lv_screen_active(), LV_PART_ANY, LV_STYLE_PROP_ANY);
256+
lv_obj_report_style_change(NULL);
261257
}
258+
lv_obj_invalidate(lv_screen_active());
262259
}
263260

264261
const LvglStyles& Theme::getLvglStyles() const

src/UI/Styles/Themes/RetroTheme.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ namespace UI::Themes
6363
lv_style_set_shadow_color(lvgl.btn, colors.border);
6464
lv_style_set_shadow_opa(lvgl.btn, LV_OPA_COVER);
6565

66+
lv_style_set_border_color(lvgl.btn_checked, colors.secondary);
67+
lv_style_set_border_width(lvgl.btn_checked, 3);
68+
6669
/* Pressed: collapse shadow for "pushed" effect */
6770
lv_style_set_recolor(lvgl.pressed, lv_color_black());
6871
lv_style_set_recolor_opa(lvgl.pressed, 30);
335 Bytes
Loading
-72 Bytes
Loading
-8.1 KB
Loading
-1.44 KB
Loading
-857 Bytes
Loading
3.68 KB
Loading
4.97 KB
Loading

0 commit comments

Comments
 (0)