Skip to content

Commit 579fbd8

Browse files
committed
WhatFaceTerminal : rename a few field to camelCase.
1 parent a8e642f commit 579fbd8

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
@@ -36,15 +36,15 @@ WatchFaceTerminal::WatchFaceTerminal(Controllers::DateTime& dateTimeController,
3636

3737
notificationIcon = lv_label_create(container, nullptr);
3838

39-
label_prompt_1 = lv_label_create(container, nullptr);
40-
lv_obj_set_style_local_text_color(label_prompt_1, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, Colors::lightGray);
41-
lv_label_set_text_static(label_prompt_1, "user@watch:~ $ now");
39+
labelPrompt1 = lv_label_create(container, nullptr);
40+
lv_obj_set_style_local_text_color(labelPrompt1, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, Colors::lightGray);
41+
lv_label_set_text_static(labelPrompt1, "user@watch:~ $ now");
4242

43-
label_time = lv_label_create(container, nullptr);
44-
lv_label_set_recolor(label_time, true);
43+
labelTime = lv_label_create(container, nullptr);
44+
lv_label_set_recolor(labelTime, true);
4545

46-
label_date = lv_label_create(container, nullptr);
47-
lv_label_set_recolor(label_date, true);
46+
labelDate = lv_label_create(container, nullptr);
47+
lv_label_set_recolor(labelDate, true);
4848

4949
batteryValue = lv_label_create(container, nullptr);
5050
lv_label_set_recolor(batteryValue, true);
@@ -59,9 +59,9 @@ WatchFaceTerminal::WatchFaceTerminal(Controllers::DateTime& dateTimeController,
5959
connectState = lv_label_create(container, nullptr);
6060
lv_label_set_recolor(connectState, true);
6161

62-
label_prompt_2 = lv_label_create(container, nullptr);
63-
lv_obj_set_style_local_text_color(label_prompt_2, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, Colors::lightGray);
64-
lv_label_set_text_static(label_prompt_2, "user@watch:~ $");
62+
labelPrompt2 = lv_label_create(container, nullptr);
63+
lv_obj_set_style_local_text_color(labelPrompt2, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, Colors::lightGray);
64+
lv_label_set_text_static(labelPrompt2, "user@watch:~ $");
6565

6666
lv_obj_align(container, nullptr, LV_ALIGN_IN_TOP_LEFT, 0, 20);
6767

@@ -100,17 +100,17 @@ void WatchFaceTerminal::Refresh() {
100100
hour = hour - 12;
101101
ampmChar[0] = 'P';
102102
}
103-
lv_label_set_text_fmt(label_time, "#fffff [TIME]# #11cc55 %02d:%02d:%02d %s#", hour, minute, second, ampmChar);
103+
lv_label_set_text_fmt(labelTime, "#fffff [TIME]# #11cc55 %02d:%02d:%02d %s#", hour, minute, second, ampmChar);
104104
} else {
105-
lv_label_set_text_fmt(label_time, "#ffffff [TIME]# #11cc55 %02d:%02d:%02d#", hour, minute, second);
105+
lv_label_set_text_fmt(labelTime, "#ffffff [TIME]# #11cc55 %02d:%02d:%02d#", hour, minute, second);
106106
}
107107

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

src/displayapp/screens/WatchFaceTerminal.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ namespace Pinetime {
4949

5050
lv_obj_t* container;
5151
lv_obj_t* notificationIcon;
52-
lv_obj_t* label_prompt_1;
53-
lv_obj_t* label_time;
54-
lv_obj_t* label_date;
52+
lv_obj_t* labelPrompt1;
53+
lv_obj_t* labelTime;
54+
lv_obj_t* labelDate;
5555
lv_obj_t* batteryValue;
5656
lv_obj_t* stepValue;
5757
lv_obj_t* heartbeatValue;
5858
lv_obj_t* connectState;
59-
lv_obj_t* label_prompt_2;
59+
lv_obj_t* labelPrompt2;
6060

6161
Controllers::DateTime& dateTimeController;
6262
const Controllers::Battery& batteryController;

0 commit comments

Comments
 (0)