This commit is contained in:
chrismcna
2020-08-23 11:26:17 +01:00
parent ea837c809e
commit d6ff3c1261
2 changed files with 2 additions and 1 deletions

View File

@@ -100,7 +100,7 @@ void crypto_ticker_setup_setup( uint32_t tile_num ) {
crypto_ticker_autosync_switch = lv_switch_create( crypto_ticker_autosync_switch_cont, NULL );
lv_obj_add_protect( crypto_ticker_autosync_switch, LV_PROTECT_CLICK_FOCUS);
lv_obj_add_style( crypto_ticker_autosync_switch, LV_SWITCH_PART_INDIC, mainbar_get_switch_style() );
lv_switch_off( crypto_ticker_autosync_switch, LV_ANIM_ON );
crypto_ticker_config->autosync ? lv_switch_on( crypto_ticker_autosync_switch, LV_ANIM_ON ) : lv_switch_off( crypto_ticker_autosync_switch, LV_ANIM_ON );
lv_obj_align( crypto_ticker_autosync_switch, crypto_ticker_autosync_switch_cont, LV_ALIGN_IN_RIGHT_MID, -5, 0 );
lv_obj_set_event_cb( crypto_ticker_autosync_switch, crypto_ticker_autosync_switch_event_cb );

View File

@@ -171,6 +171,7 @@ void crypto_ticker_widget_sync_Task( void * pvParameters ) {
lv_img_set_src( crypto_ticker_widget_icon_info, &info_ok_16px );
lv_obj_set_hidden( crypto_ticker_widget_icon_info, false );
lv_label_set_text( crypto_ticker_widget_label, crypto_ticker_widget_data.price);
lv_obj_align( crypto_ticker_widget_label, crypto_ticker_widget_cont, LV_ALIGN_IN_BOTTOM_MID, 0, 0);
}
else {
lv_img_set_src( crypto_ticker_widget_icon_info, &info_fail_16px );