@@ -52,7 +52,7 @@ PineTimeStyle::PineTimeStyle(DisplayApp* app,
5252 settingsController {settingsController},
5353 motionController {motionController} {
5454
55- /* This sets the watchface number to return to after leaving the menu */
55+ // This sets the watchface number to return to after leaving the menu
5656 settingsController.SetClockFace (2 );
5757
5858 displayedChar[0 ] = 0 ;
@@ -61,23 +61,15 @@ PineTimeStyle::PineTimeStyle(DisplayApp* app,
6161 displayedChar[3 ] = 0 ;
6262 displayedChar[4 ] = 0 ;
6363
64- // Feels like a hack, but if all the colors are white, this is probably not what the user wants
65- if (settingsController.GetPTSColorTime () + settingsController.GetPTSColorBar () + settingsController.GetPTSColorBG () == 0 ) {
66- settingsController.SetPTSColorTime (11 );
67- settingsController.SetPTSColorBar (11 );
68- settingsController.SetPTSColorBG (3 );
69- }
70-
71- /* Create a 200px wide background rectangle */
64+ // Create a 200px wide background rectangle
7265
7366 timebar = lv_obj_create (lv_scr_act (), nullptr );
7467 lv_obj_set_style_local_bg_color (timebar, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, pts_colors[settingsController.GetPTSColorBG ()]);
7568 lv_obj_set_style_local_radius (timebar, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, 0 );
7669 lv_obj_set_size (timebar, 200 , 240 );
7770 lv_obj_align (timebar, lv_scr_act (), LV_ALIGN_IN_TOP_LEFT, 5 , 0 );
7871
79- /* Display the time */
80-
72+ // Display the time
8173 timeDD1 = lv_label_create (lv_scr_act (), nullptr );
8274 lv_obj_set_style_local_text_font (timeDD1, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &open_sans_light);
8375 lv_obj_set_style_local_text_color (timeDD1, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, pts_colors[settingsController.GetPTSColorTime ()]);
@@ -96,16 +88,14 @@ PineTimeStyle::PineTimeStyle(DisplayApp* app,
9688 lv_label_set_text (timeAMPM, " " );
9789 lv_obj_align (timeAMPM, timebar, LV_ALIGN_IN_BOTTOM_LEFT, 2 , -20 );
9890
99- /* Create a 40px wide bar down the right side of the screen */
100-
91+ // Create a 40px wide bar down the right side of the screen
10192 sidebar = lv_obj_create (lv_scr_act (), nullptr );
10293 lv_obj_set_style_local_bg_color (sidebar, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, pts_colors[settingsController.GetPTSColorBar ()]);
10394 lv_obj_set_style_local_radius (sidebar, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, 0 );
10495 lv_obj_set_size (sidebar, 40 , 240 );
10596 lv_obj_align (sidebar, lv_scr_act (), LV_ALIGN_IN_TOP_RIGHT, 0 , 0 );
10697
107- /* Display icons */
108-
98+ // Display icons
10999 batteryIcon = lv_label_create (lv_scr_act (), nullptr );
110100 lv_obj_set_style_local_text_color (batteryIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex (0x000000 ));
111101 lv_label_set_text (batteryIcon, Symbols::batteryFull);
@@ -123,8 +113,7 @@ PineTimeStyle::PineTimeStyle(DisplayApp* app,
123113 lv_obj_set_style_local_text_color (notificationIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex (0x000000 ));
124114 lv_obj_align (notificationIcon, sidebar, LV_ALIGN_IN_TOP_MID, 0 , 40 );
125115
126- /* Calendar icon */
127-
116+ // Calendar icon
128117 calendarOuter = lv_obj_create (lv_scr_act (), nullptr );
129118 lv_obj_set_style_local_bg_color (calendarOuter, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex (0x000000 ));
130119 lv_obj_set_style_local_radius (calendarOuter, LV_BTN_PART_MAIN, LV_STATE_DEFAULT, 0 );
@@ -161,8 +150,7 @@ PineTimeStyle::PineTimeStyle(DisplayApp* app,
161150 lv_obj_set_size (calendarCrossBar2, 8 , 3 );
162151 lv_obj_align (calendarCrossBar2, calendarBar2, LV_ALIGN_IN_BOTTOM_MID, 0 , 0 );
163152
164- /* Display date */
165-
153+ // Display date
166154 dateDayOfWeek = lv_label_create (lv_scr_act (), nullptr );
167155 lv_obj_set_style_local_text_color (dateDayOfWeek, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex (0x000000 ));
168156 lv_label_set_text (dateDayOfWeek, " THU" );
@@ -303,7 +291,7 @@ bool PineTimeStyle::Refresh() {
303291 lv_label_set_text (timeAMPM, ampmChar);
304292 }
305293
306- /* Display the time as 2 pairs of digits */
294+ // Display the time as 2 pairs of digits
307295 sprintf (hourStr, " %c%c" , hoursChar[0 ], hoursChar[1 ]);
308296 lv_label_set_text (timeDD1, hourStr);
309297
0 commit comments