@@ -53,9 +53,11 @@ static void style_init_reset(lv_style_t* style) {
53
53
}
54
54
55
55
static void basic_init () {
56
+ using namespace Colors ;
57
+
56
58
style_init_reset (&style_bg);
57
59
lv_style_set_bg_opa (&style_bg, LV_STATE_DEFAULT, LV_OPA_COVER);
58
- lv_style_set_bg_color (&style_bg, LV_STATE_DEFAULT, Colors:: Color (Colors::Named:: Black));
60
+ lv_style_set_bg_color (&style_bg, LV_STATE_DEFAULT, Color (Black));
59
61
lv_style_set_text_font (&style_bg, LV_STATE_DEFAULT, theme.font_normal );
60
62
61
63
style_init_reset (&style_box);
@@ -64,8 +66,8 @@ static void basic_init() {
64
66
lv_style_set_value_font (&style_box, LV_STATE_DEFAULT, theme.font_normal );
65
67
66
68
style_init_reset (&style_label_white);
67
- lv_style_set_text_color (&style_label_white, LV_STATE_DEFAULT, Colors:: Color (Colors::Named:: White));
68
- lv_style_set_text_color (&style_label_white, LV_STATE_DISABLED, Colors:: Color (Colors::Named:: Gray));
69
+ lv_style_set_text_color (&style_label_white, LV_STATE_DEFAULT, Color (White));
70
+ lv_style_set_text_color (&style_label_white, LV_STATE_DISABLED, Color (Gray));
69
71
70
72
style_init_reset (&style_btn);
71
73
lv_style_set_radius (&style_btn, LV_STATE_DEFAULT, 10 );
@@ -74,14 +76,14 @@ static void basic_init() {
74
76
lv_style_set_bg_color (&style_btn, LV_STATE_CHECKED, InfiniTimeTheme::Colors::highlight);
75
77
lv_style_set_bg_color (&style_btn, LV_STATE_DISABLED, InfiniTimeTheme::Colors::bgDark);
76
78
77
- lv_style_set_text_color (&style_btn, LV_STATE_DEFAULT, Colors:: Color (Colors::Named:: White));
78
- lv_style_set_text_color (&style_btn, LV_STATE_DISABLED, Colors:: Color (Colors::Named:: Gray));
79
+ lv_style_set_text_color (&style_btn, LV_STATE_DEFAULT, Color (White));
80
+ lv_style_set_text_color (&style_btn, LV_STATE_DISABLED, Color (Gray));
79
81
80
82
lv_style_set_pad_all (&style_btn, LV_STATE_DEFAULT, LV_DPX (20 ));
81
83
lv_style_set_pad_inner (&style_btn, LV_STATE_DEFAULT, LV_DPX (15 ));
82
84
83
85
style_init_reset (&style_icon);
84
- lv_style_set_text_color (&style_icon, LV_STATE_DEFAULT, Colors:: Color (Colors::Named:: White));
86
+ lv_style_set_text_color (&style_icon, LV_STATE_DEFAULT, Color (White));
85
87
86
88
style_init_reset (&style_bar_indic);
87
89
lv_style_set_bg_opa (&style_bar_indic, LV_STATE_DEFAULT, LV_OPA_COVER);
@@ -90,17 +92,17 @@ static void basic_init() {
90
92
style_init_reset (&style_scrollbar);
91
93
lv_style_set_bg_opa (&style_scrollbar, LV_STATE_DEFAULT, LV_OPA_COVER);
92
94
lv_style_set_radius (&style_scrollbar, LV_STATE_DEFAULT, LV_RADIUS_CIRCLE);
93
- lv_style_set_bg_color (&style_scrollbar, LV_STATE_DEFAULT, Colors:: Color (Colors::Named:: White));
95
+ lv_style_set_bg_color (&style_scrollbar, LV_STATE_DEFAULT, Color (White));
94
96
lv_style_set_size (&style_scrollbar, LV_STATE_DEFAULT, LV_HOR_RES / 80 );
95
97
lv_style_set_pad_right (&style_scrollbar, LV_STATE_DEFAULT, LV_HOR_RES / 60 );
96
98
97
99
style_init_reset (&style_list_btn);
98
100
lv_style_set_bg_opa (&style_list_btn, LV_STATE_DEFAULT, LV_OPA_COVER);
99
- lv_style_set_bg_color (&style_list_btn, LV_STATE_DEFAULT, Colors:: Color (Colors::Named:: White));
101
+ lv_style_set_bg_color (&style_list_btn, LV_STATE_DEFAULT, Color (White));
100
102
lv_style_set_text_color (&style_list_btn, LV_STATE_DEFAULT, InfiniTimeTheme::Colors::bg);
101
- lv_style_set_text_color (&style_list_btn, LV_STATE_CHECKED, Colors:: Color (Colors::Named:: White));
103
+ lv_style_set_text_color (&style_list_btn, LV_STATE_CHECKED, Color (White));
102
104
lv_style_set_image_recolor (&style_list_btn, LV_STATE_DEFAULT, InfiniTimeTheme::Colors::bg);
103
- lv_style_set_image_recolor (&style_list_btn, LV_STATE_CHECKED, Colors:: Color (Colors::Named:: White));
105
+ lv_style_set_image_recolor (&style_list_btn, LV_STATE_CHECKED, Color (White));
104
106
lv_style_set_pad_left (&style_list_btn, LV_STATE_DEFAULT, LV_HOR_RES / 25 );
105
107
lv_style_set_pad_right (&style_list_btn, LV_STATE_DEFAULT, LV_HOR_RES / 25 );
106
108
lv_style_set_pad_top (&style_list_btn, LV_STATE_DEFAULT, LV_HOR_RES / 100 );
@@ -111,7 +113,7 @@ static void basic_init() {
111
113
// Causes lag unfortunately, so we'll have to live with the selected item overflowing the corner
112
114
// lv_style_set_clip_corner(&style_ddlist_list, LV_STATE_DEFAULT, true);
113
115
lv_style_set_text_line_space (&style_ddlist_list, LV_STATE_DEFAULT, LV_VER_RES / 25 );
114
- lv_style_set_bg_color (&style_ddlist_list, LV_STATE_DEFAULT, Colors:: Color (Colors::Named:: LightGray));
116
+ lv_style_set_bg_color (&style_ddlist_list, LV_STATE_DEFAULT, Color (LightGray));
115
117
lv_style_set_pad_all (&style_ddlist_list, LV_STATE_DEFAULT, 20 );
116
118
117
119
style_init_reset (&style_ddlist_selected);
@@ -129,22 +131,22 @@ static void basic_init() {
129
131
130
132
style_init_reset (&style_sw_knob);
131
133
lv_style_set_bg_opa (&style_sw_knob, LV_STATE_DEFAULT, LV_OPA_COVER);
132
- lv_style_set_bg_color (&style_sw_knob, LV_STATE_DEFAULT, Colors:: Color (Colors::Named:: Silver));
133
- lv_style_set_bg_color (&style_sw_knob, LV_STATE_CHECKED, Colors:: Color (Colors::Named:: White));
134
+ lv_style_set_bg_color (&style_sw_knob, LV_STATE_DEFAULT, Color (Silver));
135
+ lv_style_set_bg_color (&style_sw_knob, LV_STATE_CHECKED, Color (White));
134
136
lv_style_set_radius (&style_sw_knob, LV_STATE_DEFAULT, LV_RADIUS_CIRCLE);
135
137
lv_style_set_pad_all (&style_sw_knob, LV_STATE_DEFAULT, -4 );
136
138
137
139
style_init_reset (&style_slider_knob);
138
140
lv_style_set_bg_opa (&style_slider_knob, LV_STATE_DEFAULT, LV_OPA_COVER);
139
- lv_style_set_bg_color (&style_slider_knob, LV_STATE_DEFAULT, Colors:: Color (Colors::Named:: Red));
140
- lv_style_set_border_color (&style_slider_knob, LV_STATE_DEFAULT, Colors:: Color (Colors::Named:: White));
141
+ lv_style_set_bg_color (&style_slider_knob, LV_STATE_DEFAULT, Color (Red));
142
+ lv_style_set_border_color (&style_slider_knob, LV_STATE_DEFAULT, Color (White));
141
143
lv_style_set_border_width (&style_slider_knob, LV_STATE_DEFAULT, 6 );
142
144
lv_style_set_radius (&style_slider_knob, LV_STATE_DEFAULT, LV_RADIUS_CIRCLE);
143
145
lv_style_set_pad_all (&style_slider_knob, LV_STATE_DEFAULT, 10 );
144
146
lv_style_set_pad_all (&style_slider_knob, LV_STATE_PRESSED, 14 );
145
147
146
148
style_init_reset (&style_arc_indic);
147
- lv_style_set_line_color (&style_arc_indic, LV_STATE_DEFAULT, Colors:: Color (Colors::Named:: LightGray));
149
+ lv_style_set_line_color (&style_arc_indic, LV_STATE_DEFAULT, Color (LightGray));
148
150
lv_style_set_line_width (&style_arc_indic, LV_STATE_DEFAULT, LV_DPX (25 ));
149
151
lv_style_set_line_rounded (&style_arc_indic, LV_STATE_DEFAULT, true );
150
152
@@ -157,11 +159,11 @@ static void basic_init() {
157
159
lv_style_reset (&style_arc_knob);
158
160
lv_style_set_radius (&style_arc_knob, LV_STATE_DEFAULT, LV_RADIUS_CIRCLE);
159
161
lv_style_set_bg_opa (&style_arc_knob, LV_STATE_DEFAULT, LV_OPA_COVER);
160
- lv_style_set_bg_color (&style_arc_knob, LV_STATE_DEFAULT, Colors:: Color (Colors::Named:: White));
162
+ lv_style_set_bg_color (&style_arc_knob, LV_STATE_DEFAULT, Color (White));
161
163
lv_style_set_pad_all (&style_arc_knob, LV_STATE_DEFAULT, LV_DPX (5 ));
162
164
163
165
style_init_reset (&style_table_cell);
164
- lv_style_set_border_color (&style_table_cell, LV_STATE_DEFAULT, Colors:: Color (Colors::Named:: Gray));
166
+ lv_style_set_border_color (&style_table_cell, LV_STATE_DEFAULT, Color (Gray));
165
167
lv_style_set_border_width (&style_table_cell, LV_STATE_DEFAULT, 1 );
166
168
lv_style_set_border_side (&style_table_cell, LV_STATE_DEFAULT, LV_BORDER_SIDE_FULL);
167
169
lv_style_set_pad_left (&style_table_cell, LV_STATE_DEFAULT, 5 );
@@ -182,14 +184,14 @@ static void basic_init() {
182
184
lv_style_set_pad_inner (&style_lmeter, LV_STATE_DEFAULT, LV_DPX (30 ));
183
185
lv_style_set_scale_width (&style_lmeter, LV_STATE_DEFAULT, LV_DPX (25 ));
184
186
185
- lv_style_set_line_color (&style_lmeter, LV_STATE_DEFAULT, Colors:: Color (Colors::Named:: White));
186
- lv_style_set_scale_grad_color (&style_lmeter, LV_STATE_DEFAULT, Colors:: Color (Colors::Named:: White));
187
- lv_style_set_scale_end_color (&style_lmeter, LV_STATE_DEFAULT, Colors:: Color (Colors::Named:: Gray));
187
+ lv_style_set_line_color (&style_lmeter, LV_STATE_DEFAULT, Color (White));
188
+ lv_style_set_scale_grad_color (&style_lmeter, LV_STATE_DEFAULT, Color (White));
189
+ lv_style_set_scale_end_color (&style_lmeter, LV_STATE_DEFAULT, Color (Gray));
188
190
lv_style_set_line_width (&style_lmeter, LV_STATE_DEFAULT, LV_DPX (10 ));
189
191
lv_style_set_scale_end_line_width (&style_lmeter, LV_STATE_DEFAULT, LV_DPX (7 ));
190
192
191
193
style_init_reset (&style_chart_serie);
192
- lv_style_set_line_color (&style_chart_serie, LV_STATE_DEFAULT, Colors:: Color (Colors::Named:: White));
194
+ lv_style_set_line_color (&style_chart_serie, LV_STATE_DEFAULT, Color (White));
193
195
lv_style_set_line_width (&style_chart_serie, LV_STATE_DEFAULT, 4 );
194
196
lv_style_set_size (&style_chart_serie, LV_STATE_DEFAULT, 4 );
195
197
lv_style_set_bg_opa (&style_chart_serie, LV_STATE_DEFAULT, 0 );
@@ -201,7 +203,7 @@ static void basic_init() {
201
203
lv_style_reset (&style_cb_bullet);
202
204
lv_style_set_radius (&style_cb_bullet, LV_STATE_DEFAULT, LV_DPX (4 ));
203
205
lv_style_set_pattern_image (&style_cb_bullet, LV_STATE_CHECKED, LV_SYMBOL_OK);
204
- lv_style_set_pattern_recolor (&style_cb_bullet, LV_STATE_CHECKED, Colors:: Color (Colors::Named:: White));
206
+ lv_style_set_pattern_recolor (&style_cb_bullet, LV_STATE_CHECKED, Color (White));
205
207
lv_style_set_pad_all (&style_cb_bullet, LV_STATE_DEFAULT, LV_DPX (8 ));
206
208
}
207
209
@@ -217,8 +219,9 @@ static void basic_init() {
217
219
* @return a pointer to reference this theme later
218
220
*/
219
221
lv_theme_t * lv_pinetime_theme_init () {
220
- theme.color_primary = Colors::Color (Colors::Named::White);
221
- theme.color_secondary = Colors::Color (Colors::Named::Gray);
222
+ using namespace Colors ;
223
+ theme.color_primary = Color (White);
224
+ theme.color_secondary = Color (Gray);
222
225
theme.font_small = &jetbrains_mono_bold_20;
223
226
theme.font_normal = &jetbrains_mono_bold_20;
224
227
theme.font_subtitle = &jetbrains_mono_bold_20;
0 commit comments