Skip to content

Commit c2e5958

Browse files
committed
WatchFaceTerminal : rename a few fields to camelCase.
1 parent c451d2c commit c2e5958

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

src/displayapp/screens/WatchFaceTerminal.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ WatchFaceTerminal::WatchFaceTerminal(Controllers::DateTime& dateTimeController,
3939

4040
notificationIcon = lv_label_create(container, nullptr);
4141

42-
label_prompt_1 = lv_label_create(container, nullptr);
43-
lv_obj_set_style_local_text_color(label_prompt_1, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, Colors::lightGray);
44-
lv_label_set_text_static(label_prompt_1, "user@watch:~ $ now");
42+
labelPrompt1 = lv_label_create(container, nullptr);
43+
lv_obj_set_style_local_text_color(labelPrompt1, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, Colors::lightGray);
44+
lv_label_set_text_static(labelPrompt1, "user@watch:~ $ now");
4545

46-
label_time = lv_label_create(container, nullptr);
47-
lv_label_set_recolor(label_time, true);
46+
labelTime = lv_label_create(container, nullptr);
47+
lv_label_set_recolor(labelTime, true);
4848

49-
label_date = lv_label_create(container, nullptr);
50-
lv_label_set_recolor(label_date, true);
49+
labelDate = lv_label_create(container, nullptr);
50+
lv_label_set_recolor(labelDate, true);
5151

5252
batteryValue = lv_label_create(container, nullptr);
5353
lv_label_set_recolor(batteryValue, true);
@@ -65,9 +65,9 @@ WatchFaceTerminal::WatchFaceTerminal(Controllers::DateTime& dateTimeController,
6565
connectState = lv_label_create(container, nullptr);
6666
lv_label_set_recolor(connectState, true);
6767

68-
label_prompt_2 = lv_label_create(container, nullptr);
69-
lv_obj_set_style_local_text_color(label_prompt_2, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, Colors::lightGray);
70-
lv_label_set_text_static(label_prompt_2, "user@watch:~ $");
68+
labelPrompt2 = lv_label_create(container, nullptr);
69+
lv_obj_set_style_local_text_color(labelPrompt2, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, Colors::lightGray);
70+
lv_label_set_text_static(labelPrompt2, "user@watch:~ $");
7171

7272
lv_obj_align(container, nullptr, LV_ALIGN_IN_TOP_LEFT, 0, 7);
7373

@@ -106,17 +106,17 @@ void WatchFaceTerminal::Refresh() {
106106
hour = hour - 12;
107107
ampmChar[0] = 'P';
108108
}
109-
lv_label_set_text_fmt(label_time, "#ffffff [TIME]# #11cc55 %02d:%02d:%02d %s#", hour, minute, second, ampmChar);
109+
lv_label_set_text_fmt(labelTime, "#ffffff [TIME]# #11cc55 %02d:%02d:%02d %s#", hour, minute, second, ampmChar);
110110
} else {
111-
lv_label_set_text_fmt(label_time, "#ffffff [TIME]# #11cc55 %02d:%02d:%02d#", hour, minute, second);
111+
lv_label_set_text_fmt(labelTime, "#ffffff [TIME]# #11cc55 %02d:%02d:%02d#", hour, minute, second);
112112
}
113113

114114
currentDate = std::chrono::time_point_cast<std::chrono::days>(currentDateTime.Get());
115115
if (currentDate.IsUpdated()) {
116116
uint16_t year = dateTimeController.Year();
117117
Controllers::DateTime::Months month = dateTimeController.Month();
118118
uint8_t day = dateTimeController.Day();
119-
lv_label_set_text_fmt(label_date, "#ffffff [DATE]# #007fff %04d-%02d-%02d#", short(year), char(month), char(day));
119+
lv_label_set_text_fmt(labelDate, "#ffffff [DATE]# #007fff %04d-%02d-%02d#", short(year), char(month), char(day));
120120
}
121121
}
122122

src/displayapp/screens/WatchFaceTerminal.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ namespace Pinetime {
5252

5353
lv_obj_t* container;
5454
lv_obj_t* notificationIcon;
55-
lv_obj_t* label_prompt_1;
56-
lv_obj_t* label_time;
57-
lv_obj_t* label_date;
55+
lv_obj_t* labelPrompt1;
56+
lv_obj_t* labelTime;
57+
lv_obj_t* labelDate;
5858
lv_obj_t* batteryValue;
5959
lv_obj_t* stepValue;
6060
lv_obj_t* heartbeatValue;
6161
lv_obj_t* weather;
6262
lv_obj_t* connectState;
63-
lv_obj_t* label_prompt_2;
63+
lv_obj_t* labelPrompt2;
6464

6565
Controllers::DateTime& dateTimeController;
6666
const Controllers::Battery& batteryController;

0 commit comments

Comments
 (0)