Lines Matching refs:theme
77 static void style_init(my_theme_t * theme) in style_init() argument
79 style_init_reset(&theme->styles.scrollbar); in style_init()
80 lv_style_set_bg_opa(&theme->styles.scrollbar, LV_OPA_COVER); in style_init()
81 lv_style_set_bg_color(&theme->styles.scrollbar, COLOR_DARK); in style_init()
82 lv_style_set_width(&theme->styles.scrollbar, SCROLLBAR_WIDTH); in style_init()
84 style_init_reset(&theme->styles.scr); in style_init()
85 lv_style_set_bg_opa(&theme->styles.scr, LV_OPA_COVER); in style_init()
86 lv_style_set_bg_color(&theme->styles.scr, COLOR_SCR); in style_init()
87 lv_style_set_text_color(&theme->styles.scr, COLOR_DIM); in style_init()
89 style_init_reset(&theme->styles.transp); in style_init()
90 lv_style_set_bg_opa(&theme->styles.transp, LV_OPA_TRANSP); in style_init()
92 style_init_reset(&theme->styles.white); in style_init()
93 lv_style_set_bg_opa(&theme->styles.white, LV_OPA_COVER); in style_init()
94 lv_style_set_bg_color(&theme->styles.white, COLOR_WHITE); in style_init()
95 lv_style_set_line_width(&theme->styles.white, 1); in style_init()
96 lv_style_set_line_color(&theme->styles.white, COLOR_WHITE); in style_init()
97 lv_style_set_arc_width(&theme->styles.white, 2); in style_init()
98 lv_style_set_arc_color(&theme->styles.white, COLOR_WHITE); in style_init()
100 style_init_reset(&theme->styles.light); in style_init()
101 lv_style_set_bg_opa(&theme->styles.light, LV_OPA_COVER); in style_init()
102 lv_style_set_bg_color(&theme->styles.light, COLOR_LIGHT); in style_init()
103 lv_style_set_line_width(&theme->styles.light, 1); in style_init()
104 lv_style_set_line_color(&theme->styles.light, COLOR_LIGHT); in style_init()
105 lv_style_set_arc_width(&theme->styles.light, 2); in style_init()
106 lv_style_set_arc_color(&theme->styles.light, COLOR_LIGHT); in style_init()
108 style_init_reset(&theme->styles.dark); in style_init()
109 lv_style_set_bg_opa(&theme->styles.dark, LV_OPA_COVER); in style_init()
110 lv_style_set_bg_color(&theme->styles.dark, COLOR_DARK); in style_init()
111 lv_style_set_line_width(&theme->styles.dark, 1); in style_init()
112 lv_style_set_line_color(&theme->styles.dark, COLOR_DARK); in style_init()
113 lv_style_set_arc_width(&theme->styles.dark, 2); in style_init()
114 lv_style_set_arc_color(&theme->styles.dark, COLOR_DARK); in style_init()
116 style_init_reset(&theme->styles.dim); in style_init()
117 lv_style_set_bg_opa(&theme->styles.dim, LV_OPA_COVER); in style_init()
118 lv_style_set_bg_color(&theme->styles.dim, COLOR_DIM); in style_init()
119 lv_style_set_line_width(&theme->styles.dim, 1); in style_init()
120 lv_style_set_line_color(&theme->styles.dim, COLOR_DIM); in style_init()
121 lv_style_set_arc_width(&theme->styles.dim, 2); in style_init()
122 lv_style_set_arc_color(&theme->styles.dim, COLOR_DIM); in style_init()
125 style_init_reset(&theme->styles.arc_line); in style_init()
126 lv_style_set_arc_width(&theme->styles.arc_line, 6); in style_init()
127 style_init_reset(&theme->styles.arc_knob); in style_init()
128 lv_style_set_pad_all(&theme->styles.arc_knob, 5); in style_init()
132 style_init_reset(&theme->styles.ta_cursor); in style_init()
133 lv_style_set_border_side(&theme->styles.ta_cursor, LV_BORDER_SIDE_LEFT); in style_init()
134 lv_style_set_border_color(&theme->styles.ta_cursor, COLOR_DIM); in style_init()
135 lv_style_set_border_width(&theme->styles.ta_cursor, 2); in style_init()
136 lv_style_set_bg_opa(&theme->styles.ta_cursor, LV_OPA_TRANSP); in style_init()
137 lv_style_set_anim_duration(&theme->styles.ta_cursor, 500); in style_init()
147 my_theme_t * theme = theme_def; in lv_theme_simple_is_inited() local
148 if(theme == NULL) return false; in lv_theme_simple_is_inited()
149 return theme->inited; in lv_theme_simple_is_inited()
163 my_theme_t * theme = theme_def; in lv_theme_simple_deinit() local
164 if(theme) { in lv_theme_simple_deinit()
165 if(theme->inited) { in lv_theme_simple_deinit()
166 lv_style_t * theme_styles = (lv_style_t *)(&(theme->styles)); in lv_theme_simple_deinit()
186 my_theme_t * theme = theme_def; in lv_theme_simple_init() local
188 theme->base.disp = disp; in lv_theme_simple_init()
189 theme->base.font_small = LV_FONT_DEFAULT; in lv_theme_simple_init()
190 theme->base.font_normal = LV_FONT_DEFAULT; in lv_theme_simple_init()
191 theme->base.font_large = LV_FONT_DEFAULT; in lv_theme_simple_init()
192 theme->base.apply_cb = theme_apply; in lv_theme_simple_init()
194 style_init(theme); in lv_theme_simple_init()
196 if(disp == NULL || lv_display_get_theme(disp) == (lv_theme_t *)theme) { in lv_theme_simple_init()
200 theme->inited = true; in lv_theme_simple_init()
209 my_theme_t * theme = theme_def; in theme_apply() local
213 lv_obj_add_style(obj, &theme->styles.scr, 0); in theme_apply()
214 lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); in theme_apply()
222 lv_obj_add_style(obj, &theme->styles.scr, 0); in theme_apply()
227 lv_obj_add_style(obj, &theme->styles.scr, 0); in theme_apply()
228 lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); in theme_apply()
236 lv_obj_add_style(obj, &theme->styles.light, 0); in theme_apply()
241 lv_obj_add_style(obj, &theme->styles.light, 0); in theme_apply()
242 lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); in theme_apply()
246 lv_obj_add_style(obj, &theme->styles.white, 0); in theme_apply()
247 lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); in theme_apply()
251 lv_obj_add_style(obj, &theme->styles.dark, 0); in theme_apply()
259 lv_obj_add_style(obj, &theme->styles.light, LV_PART_ITEMS); in theme_apply()
265 lv_obj_add_style(obj, &theme->styles.light, LV_PART_ITEMS); in theme_apply()
269 lv_obj_add_style(obj, &theme->styles.white, 0); in theme_apply()
270 lv_obj_add_style(obj, &theme->styles.light, LV_PART_ITEMS); in theme_apply()
276 lv_obj_add_style(obj, &theme->styles.light, 0); in theme_apply()
277 lv_obj_add_style(obj, &theme->styles.dark, LV_PART_INDICATOR); in theme_apply()
283 lv_obj_add_style(obj, &theme->styles.light, 0); in theme_apply()
284 lv_obj_add_style(obj, &theme->styles.dark, LV_PART_INDICATOR); in theme_apply()
285 lv_obj_add_style(obj, &theme->styles.dim, LV_PART_KNOB); in theme_apply()
291 lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); in theme_apply()
292 lv_obj_add_style(obj, &theme->styles.light, LV_PART_ITEMS); in theme_apply()
298 lv_obj_add_style(obj, &theme->styles.light, LV_PART_INDICATOR); in theme_apply()
299 lv_obj_add_style(obj, &theme->styles.dark, LV_PART_INDICATOR | LV_STATE_CHECKED); in theme_apply()
305 lv_obj_add_style(obj, &theme->styles.light, 0); in theme_apply()
306 lv_obj_add_style(obj, &theme->styles.dim, LV_PART_KNOB); in theme_apply()
312 lv_obj_add_style(obj, &theme->styles.white, 0); in theme_apply()
313 lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); in theme_apply()
314 lv_obj_add_style(obj, &theme->styles.light, LV_PART_ITEMS); in theme_apply()
315 lv_obj_add_style(obj, &theme->styles.dark, LV_PART_CURSOR); in theme_apply()
321 lv_obj_add_style(obj, &theme->styles.light, 0); in theme_apply()
322 lv_obj_add_style(obj, &theme->styles.dark, LV_PART_SELECTED); in theme_apply()
328 lv_obj_add_style(obj, &theme->styles.white, 0); in theme_apply()
331 lv_obj_add_style(obj, &theme->styles.white, 0); in theme_apply()
332 lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); in theme_apply()
333 lv_obj_add_style(obj, &theme->styles.light, LV_PART_SELECTED); in theme_apply()
334 lv_obj_add_style(obj, &theme->styles.dark, LV_PART_SELECTED | LV_STATE_CHECKED); in theme_apply()
340 lv_obj_add_style(obj, &theme->styles.light, 0); in theme_apply()
341 lv_obj_add_style(obj, &theme->styles.transp, 0); in theme_apply()
342 lv_obj_add_style(obj, &theme->styles.arc_line, 0); in theme_apply()
343 lv_obj_add_style(obj, &theme->styles.dark, LV_PART_INDICATOR); in theme_apply()
344 lv_obj_add_style(obj, &theme->styles.arc_line, LV_PART_INDICATOR); in theme_apply()
345 lv_obj_add_style(obj, &theme->styles.dim, LV_PART_KNOB); in theme_apply()
346 lv_obj_add_style(obj, &theme->styles.arc_knob, LV_PART_KNOB); in theme_apply()
352 lv_obj_add_style(obj, &theme->styles.light, 0); in theme_apply()
353 lv_obj_add_style(obj, &theme->styles.transp, 0); in theme_apply()
354 lv_obj_add_style(obj, &theme->styles.arc_line, 0); in theme_apply()
355 lv_obj_add_style(obj, &theme->styles.dark, LV_PART_INDICATOR); in theme_apply()
356 lv_obj_add_style(obj, &theme->styles.arc_line, LV_PART_INDICATOR); in theme_apply()
362 lv_obj_add_style(obj, &theme->styles.white, 0); in theme_apply()
363 lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); in theme_apply()
364 lv_obj_add_style(obj, &theme->styles.ta_cursor, LV_PART_CURSOR | LV_STATE_FOCUSED); in theme_apply()
370 lv_obj_add_style(obj, &theme->styles.light, 0); in theme_apply()
376 lv_obj_add_style(obj, &theme->styles.scr, 0); in theme_apply()
377 lv_obj_add_style(obj, &theme->styles.white, LV_PART_ITEMS); in theme_apply()
378 lv_obj_add_style(obj, &theme->styles.light, LV_PART_ITEMS | LV_STATE_CHECKED); in theme_apply()
383 lv_obj_add_style(obj, &theme->styles.light, 0); in theme_apply()
384 lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); in theme_apply()
391 lv_obj_add_style(obj, &theme->styles.dark, 0); in theme_apply()
397 lv_obj_add_style(obj, &theme->styles.light, 0); in theme_apply()
403 lv_obj_add_style(obj, &theme->styles.light, 0); in theme_apply()
404 lv_obj_add_style(obj, &theme->styles.dark, LV_PART_CURSOR); in theme_apply()
409 lv_obj_add_style(obj, &theme->styles.scr, 0); in theme_apply()
410 lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); in theme_apply()
413 lv_obj_add_style(obj, &theme->styles.scrollbar, LV_PART_SCROLLBAR); in theme_apply()
419 lv_obj_add_style(obj, &theme->styles.light, 0); in theme_apply()