Skip to content

Commit

Permalink
fine tune the display
Browse files Browse the repository at this point in the history
  • Loading branch information
ctranstrum committed Feb 23, 2024
1 parent b7506ad commit 514c95e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions config/boards/shields/dongle_display/widgets/battery_status.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ static void set_battery_symbol(lv_obj_t *widged, struct battery_status_state sta

char text[5] = {};

if (level > 0 && level < 99) {
snprintf(text, sizeof(text), "%3u ", level);
if (level > 0 && level < 25) {
snprintf(text, sizeof(text), "%3u%%", level);
}

lv_label_set_text(label, text);
Expand Down
4 changes: 2 additions & 2 deletions config/boards/shields/dongle_display/widgets/output_status.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ int zmk_widget_output_status_init(struct zmk_widget_output_status *widget, lv_ob
lv_img_set_src(bt, &sym_bt);

lv_obj_t *bt_number = lv_img_create(widget->obj);
lv_obj_align_to(bt_number, bt, LV_ALIGN_OUT_RIGHT_TOP, 2, 2);
lv_obj_align_to(bt_number, bt, LV_ALIGN_OUT_RIGHT_TOP, 2, 6);

lv_obj_t *bt_status = lv_img_create(widget->obj);
lv_obj_align_to(bt_status, bt_number, LV_ALIGN_OUT_RIGHT_TOP, 2, 0);
lv_obj_align_to(bt_status, bt, LV_ALIGN_OUT_RIGHT_TOP, 2, -2);

static lv_style_t style_line;
lv_style_init(&style_line);
Expand Down

0 comments on commit 514c95e

Please sign in to comment.