Skip to content

Commit

Permalink
fix(color): Use ACTIVE theme color for inputs, mixes, LS, GV and SF (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
philmoz authored Aug 3, 2023
1 parent 554b4dd commit 9b3d5ca
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion radio/src/gui/colorlcd/model_gvars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class GVarStyle

// Always update colors in case theme changes
lv_style_set_bg_color(&fmContStyle, makeLvColor(COLOR_THEME_PRIMARY2));
lv_style_set_bg_color(&fmContStyleChecked, makeLvColor(COLOR_THEME_SECONDARY3));
lv_style_set_bg_color(&fmContStyleChecked, makeLvColor(COLOR_THEME_ACTIVE));
lv_style_set_text_color(&fmLabelStyle, makeLvColor(COLOR_THEME_SECONDARY1));
lv_style_set_text_color(&fmValueStyle, makeLvColor(COLOR_THEME_SECONDARY1));
lv_style_set_text_color(&fmNameStyle, makeLvColor(COLOR_THEME_SECONDARY1));
Expand Down
12 changes: 9 additions & 3 deletions radio/src/gui/colorlcd/special_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,13 +509,19 @@ class SpecialFunctionButton : public Button
lv_obj_set_grid_cell(sfRepeat, LV_GRID_ALIGN_CENTER, FUNC_COL+1, 1, LV_GRID_ALIGN_CENTER, 0, NM_ROW_CNT);

sfEnable = lv_obj_create(lvobj);
lv_obj_set_size(sfEnable, 16, 16);
lv_obj_set_size(sfEnable, 22, 22);
lv_obj_add_flag(sfEnable, LV_OBJ_FLAG_HIDDEN);
lv_obj_set_style_border_width(sfEnable, 2, 0);
lv_obj_set_style_border_color(sfEnable, makeLvColor(COLOR_THEME_SECONDARY1), 0);
lv_obj_set_style_border_width(sfEnable, 3, 0);
lv_obj_set_style_border_color(sfEnable, makeLvColor(COLOR_THEME_PRIMARY2), 0);
lv_obj_set_style_border_opa(sfEnable, LV_OPA_100, 0);
lv_obj_set_style_bg_color(sfEnable, makeLvColor(COLOR_THEME_ACTIVE), LV_STATE_CHECKED);
lv_obj_set_style_bg_opa(sfEnable, LV_OPA_100, 0);
auto sfEnableInner = lv_obj_create(sfEnable);
lv_obj_set_size(sfEnableInner, 16, 16);
lv_obj_set_style_border_width(sfEnableInner, 2, 0);
lv_obj_set_style_border_color(sfEnableInner, makeLvColor(COLOR_THEME_SECONDARY1), 0);
lv_obj_set_style_border_opa(sfEnableInner, LV_OPA_100, 0);
lv_obj_set_style_bg_opa(sfEnableInner, LV_OPA_0, 0);
lv_obj_set_grid_cell(sfEnable, LV_GRID_ALIGN_CENTER, FUNC_COL+2, 1, LV_GRID_ALIGN_CENTER, 0, NM_ROW_CNT);

init = true;
Expand Down
2 changes: 1 addition & 1 deletion radio/src/gui/colorlcd/themes/etx_lv_theme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ static void theme_apply(lv_theme_t * th, lv_obj_t * obj)
else if (lv_obj_check_type(obj, &input_mix_line_class)) {
lv_obj_add_style(obj, &styles.line_btn, 0);
lv_obj_add_style(obj, &styles.pad_tiny, 0);
lv_obj_set_style_bg_color(obj, makeLvColor(COLOR_THEME_SECONDARY3),
lv_obj_set_style_bg_color(obj, makeLvColor(COLOR_THEME_ACTIVE),
LV_STATE_CHECKED);
lv_obj_add_style(obj, &styles.focus_border, LV_STATE_FOCUSED);
lv_obj_set_style_text_color(obj, makeLvColor(COLOR_THEME_SECONDARY1), 0);
Expand Down

0 comments on commit 9b3d5ca

Please sign in to comment.