Lines Matching refs:theme

86 static void style_init(my_theme_t * theme, bool dark_bg, const lv_font_t * font)  in style_init()  argument
88 style_init_reset(&theme->styles.scrollbar); in style_init()
89 lv_style_set_bg_opa(&theme->styles.scrollbar, LV_OPA_COVER); in style_init()
90 lv_style_set_bg_color(&theme->styles.scrollbar, COLOR_FG); in style_init()
91 lv_style_set_width(&theme->styles.scrollbar, PAD_DEF); in style_init()
93 style_init_reset(&theme->styles.scr); in style_init()
94 lv_style_set_bg_opa(&theme->styles.scr, LV_OPA_COVER); in style_init()
95 lv_style_set_bg_color(&theme->styles.scr, COLOR_BG); in style_init()
96 lv_style_set_text_color(&theme->styles.scr, COLOR_FG); in style_init()
97 lv_style_set_pad_row(&theme->styles.scr, PAD_DEF); in style_init()
98 lv_style_set_pad_column(&theme->styles.scr, PAD_DEF); in style_init()
99 lv_style_set_text_font(&theme->styles.scr, font); in style_init()
101 style_init_reset(&theme->styles.card); in style_init()
102 lv_style_set_bg_opa(&theme->styles.card, LV_OPA_COVER); in style_init()
103 lv_style_set_bg_color(&theme->styles.card, COLOR_BG); in style_init()
104 lv_style_set_border_color(&theme->styles.card, COLOR_FG); in style_init()
105 lv_style_set_radius(&theme->styles.card, 2); in style_init()
106 lv_style_set_border_width(&theme->styles.card, BORDER_W_NORMAL); in style_init()
107 lv_style_set_pad_all(&theme->styles.card, PAD_DEF); in style_init()
108 lv_style_set_pad_gap(&theme->styles.card, PAD_DEF); in style_init()
109 lv_style_set_text_color(&theme->styles.card, COLOR_FG); in style_init()
110 lv_style_set_line_width(&theme->styles.card, 2); in style_init()
111 lv_style_set_line_color(&theme->styles.card, COLOR_FG); in style_init()
112 lv_style_set_arc_width(&theme->styles.card, 2); in style_init()
113 lv_style_set_arc_color(&theme->styles.card, COLOR_FG); in style_init()
114 lv_style_set_outline_color(&theme->styles.card, COLOR_FG); in style_init()
115 lv_style_set_anim_duration(&theme->styles.card, 300); in style_init()
117 style_init_reset(&theme->styles.pr); in style_init()
118 lv_style_set_border_width(&theme->styles.pr, BORDER_W_PR); in style_init()
120 style_init_reset(&theme->styles.inv); in style_init()
121 lv_style_set_bg_opa(&theme->styles.inv, LV_OPA_COVER); in style_init()
122 lv_style_set_bg_color(&theme->styles.inv, COLOR_FG); in style_init()
123 lv_style_set_border_color(&theme->styles.inv, COLOR_BG); in style_init()
124 lv_style_set_line_color(&theme->styles.inv, COLOR_BG); in style_init()
125 lv_style_set_arc_color(&theme->styles.inv, COLOR_BG); in style_init()
126 lv_style_set_text_color(&theme->styles.inv, COLOR_BG); in style_init()
127 lv_style_set_outline_color(&theme->styles.inv, COLOR_BG); in style_init()
129 style_init_reset(&theme->styles.disabled); in style_init()
130 lv_style_set_border_width(&theme->styles.disabled, BORDER_W_DIS); in style_init()
132 style_init_reset(&theme->styles.focus); in style_init()
133 lv_style_set_outline_width(&theme->styles.focus, 1); in style_init()
134 lv_style_set_outline_pad(&theme->styles.focus, BORDER_W_FOCUS); in style_init()
136 style_init_reset(&theme->styles.edit); in style_init()
137 lv_style_set_outline_width(&theme->styles.edit, BORDER_W_EDIT); in style_init()
139 style_init_reset(&theme->styles.large_border); in style_init()
140 lv_style_set_border_width(&theme->styles.large_border, BORDER_W_EDIT); in style_init()
142 style_init_reset(&theme->styles.pad_gap); in style_init()
143 lv_style_set_pad_gap(&theme->styles.pad_gap, PAD_DEF); in style_init()
145 style_init_reset(&theme->styles.pad_zero); in style_init()
146 lv_style_set_pad_all(&theme->styles.pad_zero, 0); in style_init()
147 lv_style_set_pad_gap(&theme->styles.pad_zero, 0); in style_init()
149 style_init_reset(&theme->styles.no_radius); in style_init()
150 lv_style_set_radius(&theme->styles.no_radius, 0); in style_init()
152 style_init_reset(&theme->styles.radius_circle); in style_init()
153 lv_style_set_radius(&theme->styles.radius_circle, LV_RADIUS_CIRCLE); in style_init()
155 style_init_reset(&theme->styles.large_line_space); in style_init()
156 lv_style_set_text_line_space(&theme->styles.large_line_space, 6); in style_init()
158 style_init_reset(&theme->styles.underline); in style_init()
159 lv_style_set_text_decor(&theme->styles.underline, LV_TEXT_DECOR_UNDERLINE); in style_init()
162 style_init_reset(&theme->styles.ta_cursor); in style_init()
163 lv_style_set_border_side(&theme->styles.ta_cursor, LV_BORDER_SIDE_LEFT); in style_init()
164 lv_style_set_border_color(&theme->styles.ta_cursor, COLOR_FG); in style_init()
165 lv_style_set_border_width(&theme->styles.ta_cursor, 2); in style_init()
166 lv_style_set_bg_opa(&theme->styles.ta_cursor, LV_OPA_TRANSP); in style_init()
167 lv_style_set_anim_duration(&theme->styles.ta_cursor, 500); in style_init()
171 style_init_reset(&theme->styles.chart_indic); in style_init()
172 lv_style_set_radius(&theme->styles.chart_indic, LV_RADIUS_CIRCLE); in style_init()
173 …lv_style_set_size(&theme->styles.chart_indic, lv_display_dpx(theme->base.disp, 8), lv_display_dpx( in style_init()
174 lv_style_set_bg_color(&theme->styles.chart_indic, COLOR_FG); in style_init()
175 lv_style_set_bg_opa(&theme->styles.chart_indic, LV_OPA_COVER); in style_init()
185 my_theme_t * theme = theme_def; in lv_theme_mono_is_inited() local
186 if(theme == NULL) return false; in lv_theme_mono_is_inited()
187 return theme->inited; in lv_theme_mono_is_inited()
192 my_theme_t * theme = theme_def; in lv_theme_mono_deinit() local
193 if(theme) { in lv_theme_mono_deinit()
194 if(theme->inited) { in lv_theme_mono_deinit()
195 lv_style_t * theme_styles = (lv_style_t *)(&(theme->styles)); in lv_theme_mono_deinit()
215 my_theme_t * theme = theme_def; in lv_theme_mono_init() local
217 theme->base.disp = disp; in lv_theme_mono_init()
218 theme->base.font_small = LV_FONT_DEFAULT; in lv_theme_mono_init()
219 theme->base.font_normal = LV_FONT_DEFAULT; in lv_theme_mono_init()
220 theme->base.font_large = LV_FONT_DEFAULT; in lv_theme_mono_init()
221 theme->base.apply_cb = theme_apply; in lv_theme_mono_init()
223 style_init(theme, dark_bg, font); in lv_theme_mono_init()
225 …if(disp == NULL || lv_display_get_theme(disp) == (lv_theme_t *) theme) lv_obj_report_style_change(… in lv_theme_mono_init()
227 theme->inited = true; in lv_theme_mono_init()
236 my_theme_t * theme = theme_def; in theme_apply() local
240 lv_obj_add_style(obj, &theme->styles.scr, 0); in theme_apply()
241 lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); in theme_apply()
253 lv_obj_add_style(obj, &theme->styles.card, 0); in theme_apply()
254 lv_obj_add_style(obj, &theme->styles.no_radius, 0); in theme_apply()
255 lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); in theme_apply()
263 lv_obj_add_style(obj, &theme->styles.card, 0); in theme_apply()
264 lv_obj_add_style(obj, &theme->styles.no_radius, 0); in theme_apply()
269 lv_obj_add_style(obj, &theme->styles.card, 0); in theme_apply()
270 lv_obj_add_style(obj, &theme->styles.no_radius, 0); in theme_apply()
271 lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); in theme_apply()
275 lv_obj_add_style(obj, &theme->styles.card, 0); in theme_apply()
276 lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); in theme_apply()
280 lv_obj_add_style(obj, &theme->styles.card, 0); in theme_apply()
281 lv_obj_add_style(obj, &theme->styles.pr, LV_STATE_PRESSED); in theme_apply()
282 lv_obj_add_style(obj, &theme->styles.inv, LV_STATE_CHECKED); in theme_apply()
283 lv_obj_add_style(obj, &theme->styles.disabled, LV_STATE_DISABLED); in theme_apply()
284 lv_obj_add_style(obj, &theme->styles.focus, LV_STATE_FOCUS_KEY); in theme_apply()
285 lv_obj_add_style(obj, &theme->styles.edit, LV_STATE_EDITED); in theme_apply()
293 lv_obj_add_style(obj, &theme->styles.pad_gap, 0); in theme_apply()
294 lv_obj_add_style(obj, &theme->styles.card, LV_PART_ITEMS); in theme_apply()
295 lv_obj_add_style(obj, &theme->styles.pr, LV_PART_ITEMS | LV_STATE_PRESSED); in theme_apply()
296 lv_obj_add_style(obj, &theme->styles.disabled, LV_PART_ITEMS | LV_STATE_DISABLED); in theme_apply()
297 lv_obj_add_style(obj, &theme->styles.underline, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); in theme_apply()
298 lv_obj_add_style(obj, &theme->styles.large_border, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); in theme_apply()
304 lv_obj_add_style(obj, &theme->styles.pad_gap, 0); in theme_apply()
305 lv_obj_add_style(obj, &theme->styles.card, LV_PART_ITEMS); in theme_apply()
306 lv_obj_add_style(obj, &theme->styles.pr, LV_PART_ITEMS | LV_STATE_PRESSED); in theme_apply()
307 lv_obj_add_style(obj, &theme->styles.inv, LV_PART_ITEMS | LV_STATE_CHECKED); in theme_apply()
308 lv_obj_add_style(obj, &theme->styles.disabled, LV_PART_ITEMS | LV_STATE_DISABLED); in theme_apply()
309 lv_obj_add_style(obj, &theme->styles.focus, LV_STATE_FOCUS_KEY); in theme_apply()
310 lv_obj_add_style(obj, &theme->styles.underline, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); in theme_apply()
311 lv_obj_add_style(obj, &theme->styles.large_border, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); in theme_apply()
315 lv_obj_add_style(obj, &theme->styles.card, 0); in theme_apply()
316 lv_obj_add_style(obj, &theme->styles.focus, LV_STATE_FOCUS_KEY); in theme_apply()
317 lv_obj_add_style(obj, &theme->styles.card, LV_PART_ITEMS); in theme_apply()
318 lv_obj_add_style(obj, &theme->styles.pr, LV_PART_ITEMS | LV_STATE_PRESSED); in theme_apply()
319 lv_obj_add_style(obj, &theme->styles.inv, LV_PART_ITEMS | LV_STATE_CHECKED); in theme_apply()
320 lv_obj_add_style(obj, &theme->styles.disabled, LV_PART_ITEMS | LV_STATE_DISABLED); in theme_apply()
321 lv_obj_add_style(obj, &theme->styles.underline, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); in theme_apply()
322 lv_obj_add_style(obj, &theme->styles.large_border, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); in theme_apply()
328 lv_obj_add_style(obj, &theme->styles.card, 0); in theme_apply()
329 lv_obj_add_style(obj, &theme->styles.pad_zero, 0); in theme_apply()
330 lv_obj_add_style(obj, &theme->styles.inv, LV_PART_INDICATOR); in theme_apply()
331 lv_obj_add_style(obj, &theme->styles.focus, LV_STATE_FOCUS_KEY); in theme_apply()
337 lv_obj_add_style(obj, &theme->styles.card, 0); in theme_apply()
338 lv_obj_add_style(obj, &theme->styles.pad_zero, 0); in theme_apply()
339 lv_obj_add_style(obj, &theme->styles.inv, LV_PART_INDICATOR); in theme_apply()
340 lv_obj_add_style(obj, &theme->styles.card, LV_PART_KNOB); in theme_apply()
341 lv_obj_add_style(obj, &theme->styles.radius_circle, LV_PART_KNOB); in theme_apply()
342 lv_obj_add_style(obj, &theme->styles.focus, LV_STATE_FOCUS_KEY); in theme_apply()
343 lv_obj_add_style(obj, &theme->styles.edit, LV_STATE_EDITED); in theme_apply()
349 lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); in theme_apply()
350 lv_obj_add_style(obj, &theme->styles.card, LV_PART_ITEMS); in theme_apply()
351 lv_obj_add_style(obj, &theme->styles.no_radius, LV_PART_ITEMS); in theme_apply()
352 lv_obj_add_style(obj, &theme->styles.pr, LV_PART_ITEMS | LV_STATE_PRESSED); in theme_apply()
353 lv_obj_add_style(obj, &theme->styles.focus, LV_STATE_FOCUS_KEY); in theme_apply()
354 lv_obj_add_style(obj, &theme->styles.inv, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); in theme_apply()
355 lv_obj_add_style(obj, &theme->styles.edit, LV_STATE_EDITED); in theme_apply()
361 lv_obj_add_style(obj, &theme->styles.pad_gap, LV_PART_MAIN); in theme_apply()
362 lv_obj_add_style(obj, &theme->styles.card, LV_PART_INDICATOR); in theme_apply()
363 lv_obj_add_style(obj, &theme->styles.disabled, LV_PART_INDICATOR | LV_STATE_DISABLED); in theme_apply()
364 lv_obj_add_style(obj, &theme->styles.inv, LV_PART_INDICATOR | LV_STATE_CHECKED); in theme_apply()
365 lv_obj_add_style(obj, &theme->styles.pr, LV_PART_INDICATOR | LV_STATE_PRESSED); in theme_apply()
366 lv_obj_add_style(obj, &theme->styles.focus, LV_STATE_FOCUS_KEY); in theme_apply()
367 lv_obj_add_style(obj, &theme->styles.edit, LV_STATE_EDITED); in theme_apply()
373 lv_obj_add_style(obj, &theme->styles.card, 0); in theme_apply()
374 lv_obj_add_style(obj, &theme->styles.radius_circle, 0); in theme_apply()
375 lv_obj_add_style(obj, &theme->styles.pad_zero, 0); in theme_apply()
376 lv_obj_add_style(obj, &theme->styles.inv, LV_PART_INDICATOR); in theme_apply()
377 lv_obj_add_style(obj, &theme->styles.radius_circle, LV_PART_INDICATOR); in theme_apply()
378 lv_obj_add_style(obj, &theme->styles.card, LV_PART_KNOB); in theme_apply()
379 lv_obj_add_style(obj, &theme->styles.radius_circle, LV_PART_KNOB); in theme_apply()
380 lv_obj_add_style(obj, &theme->styles.pad_zero, LV_PART_KNOB); in theme_apply()
381 lv_obj_add_style(obj, &theme->styles.focus, LV_STATE_FOCUS_KEY); in theme_apply()
382 lv_obj_add_style(obj, &theme->styles.edit, LV_STATE_EDITED); in theme_apply()
388 lv_obj_add_style(obj, &theme->styles.card, 0); in theme_apply()
389 lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); in theme_apply()
390 lv_obj_add_style(obj, &theme->styles.chart_indic, LV_PART_INDICATOR); in theme_apply()
391 lv_obj_add_style(obj, &theme->styles.card, LV_PART_ITEMS); in theme_apply()
392 lv_obj_add_style(obj, &theme->styles.card, LV_PART_CURSOR); in theme_apply()
393 lv_obj_add_style(obj, &theme->styles.focus, LV_STATE_FOCUS_KEY); in theme_apply()
399 lv_obj_add_style(obj, &theme->styles.card, 0); in theme_apply()
400 lv_obj_add_style(obj, &theme->styles.large_line_space, 0); in theme_apply()
401 lv_obj_add_style(obj, &theme->styles.inv, LV_PART_SELECTED); in theme_apply()
402 lv_obj_add_style(obj, &theme->styles.focus, LV_STATE_FOCUS_KEY); in theme_apply()
403 lv_obj_add_style(obj, &theme->styles.edit, LV_STATE_EDITED); in theme_apply()
409 lv_obj_add_style(obj, &theme->styles.card, 0); in theme_apply()
410 lv_obj_add_style(obj, &theme->styles.pr, LV_STATE_PRESSED); in theme_apply()
411 lv_obj_add_style(obj, &theme->styles.focus, LV_STATE_FOCUS_KEY); in theme_apply()
412 lv_obj_add_style(obj, &theme->styles.edit, LV_STATE_EDITED); in theme_apply()
415 lv_obj_add_style(obj, &theme->styles.card, 0); in theme_apply()
416 lv_obj_add_style(obj, &theme->styles.large_line_space, 0); in theme_apply()
417 lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); in theme_apply()
418 lv_obj_add_style(obj, &theme->styles.inv, LV_PART_SELECTED | LV_STATE_CHECKED); in theme_apply()
419 lv_obj_add_style(obj, &theme->styles.pr, LV_PART_SELECTED | LV_STATE_PRESSED); in theme_apply()
420 lv_obj_add_style(obj, &theme->styles.focus, LV_STATE_FOCUS_KEY); in theme_apply()
421 lv_obj_add_style(obj, &theme->styles.edit, LV_STATE_EDITED); in theme_apply()
427 lv_obj_add_style(obj, &theme->styles.card, 0); in theme_apply()
428 lv_obj_add_style(obj, &theme->styles.inv, LV_PART_INDICATOR); in theme_apply()
429 lv_obj_add_style(obj, &theme->styles.pad_zero, LV_PART_INDICATOR); in theme_apply()
430 lv_obj_add_style(obj, &theme->styles.card, LV_PART_KNOB); in theme_apply()
431 lv_obj_add_style(obj, &theme->styles.radius_circle, LV_PART_KNOB); in theme_apply()
432 lv_obj_add_style(obj, &theme->styles.focus, LV_STATE_FOCUS_KEY); in theme_apply()
433 lv_obj_add_style(obj, &theme->styles.edit, LV_STATE_EDITED); in theme_apply()
439 lv_obj_add_style(obj, &theme->styles.card, 0); in theme_apply()
440 lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); in theme_apply()
441 lv_obj_add_style(obj, &theme->styles.ta_cursor, LV_PART_CURSOR | LV_STATE_FOCUSED); in theme_apply()
442 lv_obj_add_style(obj, &theme->styles.focus, LV_STATE_FOCUSED); in theme_apply()
443 lv_obj_add_style(obj, &theme->styles.edit, LV_STATE_EDITED); in theme_apply()
449 lv_obj_add_style(obj, &theme->styles.card, 0); in theme_apply()
450 lv_obj_add_style(obj, &theme->styles.no_radius, 0); in theme_apply()
451 lv_obj_add_style(obj, &theme->styles.pr, LV_PART_ITEMS | LV_STATE_PRESSED); in theme_apply()
452 lv_obj_add_style(obj, &theme->styles.disabled, LV_PART_ITEMS | LV_STATE_DISABLED); in theme_apply()
453 lv_obj_add_style(obj, &theme->styles.focus, LV_STATE_FOCUS_KEY); in theme_apply()
454 lv_obj_add_style(obj, &theme->styles.edit, LV_STATE_EDITED); in theme_apply()
455 lv_obj_add_style(obj, &theme->styles.large_border, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); in theme_apply()
461 lv_obj_add_style(obj, &theme->styles.card, 0); in theme_apply()
462 lv_obj_add_style(obj, &theme->styles.card, LV_PART_ITEMS); in theme_apply()
463 lv_obj_add_style(obj, &theme->styles.pr, LV_PART_ITEMS | LV_STATE_PRESSED); in theme_apply()
464 lv_obj_add_style(obj, &theme->styles.inv, LV_PART_ITEMS | LV_STATE_CHECKED); in theme_apply()
465 lv_obj_add_style(obj, &theme->styles.focus, LV_STATE_FOCUS_KEY); in theme_apply()
466 lv_obj_add_style(obj, &theme->styles.edit, LV_STATE_EDITED); in theme_apply()
467 lv_obj_add_style(obj, &theme->styles.large_border, LV_PART_ITEMS | LV_STATE_EDITED); in theme_apply()
472 lv_obj_add_style(obj, &theme->styles.card, 0); in theme_apply()
473 lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); in theme_apply()
480 lv_obj_add_style(obj, &theme->styles.card, 0); in theme_apply()
481 lv_obj_add_style(obj, &theme->styles.pr, LV_STATE_PRESSED); in theme_apply()
482 lv_obj_add_style(obj, &theme->styles.focus, LV_STATE_FOCUS_KEY); in theme_apply()
483 lv_obj_add_style(obj, &theme->styles.large_border, LV_STATE_EDITED); in theme_apply()
489 lv_obj_add_style(obj, &theme->styles.card, 0); in theme_apply()
495 lv_obj_add_style(obj, &theme->styles.card, 0); in theme_apply()
496 lv_obj_add_style(obj, &theme->styles.inv, LV_PART_CURSOR); in theme_apply()
497 lv_obj_add_style(obj, &theme->styles.focus, LV_STATE_FOCUS_KEY); in theme_apply()
498 lv_obj_add_style(obj, &theme->styles.edit, LV_STATE_EDITED); in theme_apply()
503 lv_obj_add_style(obj, &theme->styles.scr, 0); in theme_apply()
504 lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); in theme_apply()
507 lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); in theme_apply()
513 lv_obj_add_style(obj, &theme->styles.card, 0); in theme_apply()