Updated code::blocks lvgl simulator (font updated among other things)
This commit is contained in:
parent
da65442ad5
commit
967913d8df
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -297,7 +297,7 @@ void _display_message_notification(NotificationScreen_t * const notificationScre
|
|||||||
lv_label_set_long_mode(notificationScreen->type_label, LV_LABEL_LONG_SCROLL_CIRCULAR);
|
lv_label_set_long_mode(notificationScreen->type_label, LV_LABEL_LONG_SCROLL_CIRCULAR);
|
||||||
lv_obj_set_style_anim_speed(notificationScreen->type_label, 10, LV_PART_MAIN);
|
lv_obj_set_style_anim_speed(notificationScreen->type_label, 10, LV_PART_MAIN);
|
||||||
lv_obj_set_width(notificationScreen->type_label, lv_pct(27));
|
lv_obj_set_width(notificationScreen->type_label, lv_pct(27));
|
||||||
lv_label_set_text(notificationScreen->type_label, _notification_type_to_char(notification->type));
|
lv_label_set_text_static(notificationScreen->type_label, _notification_type_to_char(notification->type));
|
||||||
|
|
||||||
if(notificationScreen->title_label)
|
if(notificationScreen->title_label)
|
||||||
{
|
{
|
||||||
@ -396,7 +396,7 @@ const char *_notification_timestamp_to_date(time_t timestamp)
|
|||||||
static char date[9]; //Ex 7:23PM
|
static char date[9]; //Ex 7:23PM
|
||||||
|
|
||||||
struct tm *time = gmtime(×tamp);
|
struct tm *time = gmtime(×tamp);
|
||||||
sprintf(date, "%s%d:%s%d", time->tm_hour > 10 ? "" : "0", time->tm_hour, time->tm_min > 10 ? "" : "0", time->tm_min);
|
sprintf(date, "%s%d:%s%d", time->tm_hour < 10 ? "0" : "", time->tm_hour, time->tm_min < 10 ? "0" : "", time->tm_min);
|
||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -317,20 +317,25 @@ static void load_display_side_screen(SettingsScreen_t *settingsScreen)
|
|||||||
|
|
||||||
static void load_notifications_side_screen(SettingsScreen_t *settingsScreen)
|
static void load_notifications_side_screen(SettingsScreen_t *settingsScreen)
|
||||||
{
|
{
|
||||||
|
// Messages notification header text
|
||||||
|
lv_obj_t *label = lv_label_create(settingsScreen->side_screen);
|
||||||
|
lv_label_set_text_static(label, "Messages\nNotifications :");
|
||||||
|
|
||||||
// Notification enable switch
|
// Notification enable switch
|
||||||
lv_obj_t *notification_enable_switch = lv_switch_create(settingsScreen->side_screen);
|
lv_obj_t *notification_enable_switch = lv_switch_create(settingsScreen->side_screen);
|
||||||
bool toggled = false;
|
bool toggled = false;
|
||||||
//if(settingsScreen->settingsScreenAPIInterface.setWristTiltSettingsCb)
|
//if(settingsScreen->settingsScreenAPIInterface.setWristTiltSettingsCb)
|
||||||
//settingsScreen->settingsScreenAPIInterface.setWristTiltSettingsCb(&toggled, SETTING_MODE_GET);
|
//settingsScreen->settingsScreenAPIInterface.setWristTiltSettingsCb(&toggled, SETTING_MODE_GET);
|
||||||
if(toggled)lv_obj_add_state(notification_enable_switch, LV_STATE_CHECKED);
|
if(toggled)lv_obj_add_state(notification_enable_switch, LV_STATE_CHECKED);
|
||||||
|
lv_obj_align_to(notification_enable_switch, label, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
||||||
//lv_obj_add_event_cb(notification_enable_switch, &(activation_switch_cb), LV_EVENT_VALUE_CHANGED, settingsScreen);
|
//lv_obj_add_event_cb(notification_enable_switch, &(activation_switch_cb), LV_EVENT_VALUE_CHANGED, settingsScreen);
|
||||||
|
|
||||||
lv_obj_t * label = lv_label_create(settingsScreen->side_screen);
|
label = lv_label_create(settingsScreen->side_screen);
|
||||||
lv_label_set_text_static(label, "Notifications");
|
lv_label_set_text_static(label, "Enabled");
|
||||||
lv_obj_align_to(label, notification_enable_switch, LV_ALIGN_OUT_RIGHT_MID, 5, 0);
|
lv_obj_align_to(label, notification_enable_switch, LV_ALIGN_OUT_RIGHT_MID, 5, 0);
|
||||||
|
|
||||||
label = lv_label_create(settingsScreen->side_screen);
|
label = lv_label_create(settingsScreen->side_screen);
|
||||||
lv_label_set_text_static(label, "Vibrate on\nnotifications :");
|
lv_label_set_text_static(label, "Vibrate On\nNotifications :");
|
||||||
lv_obj_align_to(label, notification_enable_switch, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
lv_obj_align_to(label, notification_enable_switch, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
||||||
|
|
||||||
lv_obj_t *on_notification_vibration_duration_roller = lv_roller_create(settingsScreen->side_screen);
|
lv_obj_t *on_notification_vibration_duration_roller = lv_roller_create(settingsScreen->side_screen);
|
||||||
@ -353,21 +358,24 @@ static void load_notifications_side_screen(SettingsScreen_t *settingsScreen)
|
|||||||
lv_label_set_text_static(label, "Strength");
|
lv_label_set_text_static(label, "Strength");
|
||||||
lv_obj_align_to(label, on_notification_vibration_strength_roller, LV_ALIGN_OUT_RIGHT_MID, 5, 0);
|
lv_obj_align_to(label, on_notification_vibration_strength_roller, LV_ALIGN_OUT_RIGHT_MID, 5, 0);
|
||||||
|
|
||||||
|
label = lv_label_create(settingsScreen->side_screen);
|
||||||
|
lv_label_set_text_static(label, "Calls\nNotifications :");
|
||||||
|
lv_obj_align_to(label, on_notification_vibration_strength_roller, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
||||||
// Call enable switch
|
// Call enable switch
|
||||||
lv_obj_t *call_enable_switch = lv_switch_create(settingsScreen->side_screen);
|
lv_obj_t *call_enable_switch = lv_switch_create(settingsScreen->side_screen);
|
||||||
toggled = false;
|
toggled = false;
|
||||||
//if(settingsScreen->settingsScreenAPIInterface.setWristTiltSettingsCb)
|
//if(settingsScreen->settingsScreenAPIInterface.setWristTiltSettingsCb)
|
||||||
//settingsScreen->settingsScreenAPIInterface.setWristTiltSettingsCb(&toggled, SETTING_MODE_GET);
|
//settingsScreen->settingsScreenAPIInterface.setWristTiltSettingsCb(&toggled, SETTING_MODE_GET);
|
||||||
if(toggled)lv_obj_add_state(call_enable_switch, LV_STATE_CHECKED);
|
if(toggled)lv_obj_add_state(call_enable_switch, LV_STATE_CHECKED);
|
||||||
lv_obj_align_to(call_enable_switch, on_notification_vibration_strength_roller, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
lv_obj_align_to(call_enable_switch, label, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
||||||
//lv_obj_add_event_cb(notification_enable_switch, &(activation_switch_cb), LV_EVENT_VALUE_CHANGED, settingsScreen);
|
//lv_obj_add_event_cb(notification_enable_switch, &(activation_switch_cb), LV_EVENT_VALUE_CHANGED, settingsScreen);
|
||||||
|
|
||||||
label = lv_label_create(settingsScreen->side_screen);
|
label = lv_label_create(settingsScreen->side_screen);
|
||||||
lv_label_set_text_static(label, "Calls");
|
lv_label_set_text_static(label, "Enabled");
|
||||||
lv_obj_align_to(label, call_enable_switch, LV_ALIGN_OUT_RIGHT_MID, 5, 0);
|
lv_obj_align_to(label, call_enable_switch, LV_ALIGN_OUT_RIGHT_MID, 5, 0);
|
||||||
|
|
||||||
label = lv_label_create(settingsScreen->side_screen);
|
label = lv_label_create(settingsScreen->side_screen);
|
||||||
lv_label_set_text_static(label, "Vibrate on calls :");
|
lv_label_set_text_static(label, "Vibrate On Calls :");
|
||||||
lv_obj_align_to(label, call_enable_switch, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
lv_obj_align_to(label, call_enable_switch, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
||||||
|
|
||||||
lv_obj_t *on_call_vibration_duration_roller = lv_roller_create(settingsScreen->side_screen);
|
lv_obj_t *on_call_vibration_duration_roller = lv_roller_create(settingsScreen->side_screen);
|
||||||
|
@ -209,7 +209,8 @@ static void hide_hour_and_minutes_hand_cb(lv_event_t *e)
|
|||||||
strcpy(title, "JoeJohny John");
|
strcpy(title, "JoeJohny John");
|
||||||
|
|
||||||
char *body = malloc(300+1);
|
char *body = malloc(300+1);
|
||||||
strcpy(body, "Hey what's up dude ? What are you doing tonight ?\
|
char test[] = "aéb";
|
||||||
|
strcpy(body, "Héy what's up dude ? What are you doing tonight ?\
|
||||||
Wanna go to the fair with me ?\
|
Wanna go to the fair with me ?\
|
||||||
This is a quite long message I agree, but it is important\
|
This is a quite long message I agree, but it is important\
|
||||||
to let you know what I do for me and you bro !");
|
to let you know what I do for me and you bro !");
|
||||||
@ -386,7 +387,7 @@ void watch_face_create(WatchFace_t * const watchFace)
|
|||||||
}
|
}
|
||||||
watchFace->dateWindow.dateWindowWidget = lv_label_create(watchFace->display);
|
watchFace->dateWindow.dateWindowWidget = lv_label_create(watchFace->display);
|
||||||
lv_label_set_text_static(watchFace->dateWindow.dateWindowWidget, watchFace->dateWindow.dateWindowText);
|
lv_label_set_text_static(watchFace->dateWindow.dateWindowWidget, watchFace->dateWindow.dateWindowText);
|
||||||
lv_obj_set_pos(watchFace->dateWindow.dateWindowWidget, 180,112);
|
lv_obj_set_pos(watchFace->dateWindow.dateWindowWidget, 180,111);
|
||||||
lv_obj_set_width(watchFace->dateWindow.dateWindowWidget, 20);
|
lv_obj_set_width(watchFace->dateWindow.dateWindowWidget, 20);
|
||||||
lv_obj_set_style_text_align(watchFace->dateWindow.dateWindowWidget, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN);
|
lv_obj_set_style_text_align(watchFace->dateWindow.dateWindowWidget, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user