Skip to content

Commit

Permalink
Merge pull request #478 from ligenxxxx/fix-clock-page-item-type
Browse files Browse the repository at this point in the history
Fix clock page item type
  • Loading branch information
ligenxxxx authored Feb 5, 2025
2 parents f902168 + 413c827 commit 55ece75
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ui/page_clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,12 +386,12 @@ static lv_obj_t *page_clock_create(lv_obj_t *parent, panel_arr_t *arr) {
btn_group_set_sel(&page_clock_items[ITEM_FORMAT].data.btn, g_setting.clock.format);

page_clock_items[ITEM_SET_CLOCK].data.obj = create_label_item(cont, _lang("Set Clock"), 1, 3, 3);
page_clock_items[ITEM_SET_CLOCK].type = ITEM_TYPE_OBJ;
page_clock_items[ITEM_SET_CLOCK].type = ITEM_TYPE_BTN;
page_clock_items[ITEM_SET_CLOCK].panel = arr->panel[3];

snprintf(buf, sizeof(buf), "< %s", _lang("Back"));
page_clock_items[ITEM_BACK].data.obj = create_label_item(cont, buf, 1, 4, 1);
page_clock_items[ITEM_BACK].type = ITEM_TYPE_OBJ;
page_clock_items[ITEM_BACK].type = ITEM_TYPE_BTN;
page_clock_items[ITEM_BACK].panel = arr->panel[4];

page_clock_create_datetime_item(cont, 5);
Expand Down Expand Up @@ -441,7 +441,7 @@ static void page_clock_exit() {
for (int i = 0; i < ITEM_LIST_TOTAL; ++i) {
switch (page_clock_items[i].type) {
case ITEM_TYPE_OBJ:
lv_dropdown_close(page_clock_items[page_clock_item_selected].data.obj);
lv_dropdown_close(page_clock_items[i].data.obj);
}
}

Expand Down

0 comments on commit 55ece75

Please sign in to comment.