Lines Matching refs:obj
59 static void theme_apply(lv_theme_t * th, lv_obj_t * obj);
197 static void theme_apply(lv_theme_t * th, lv_obj_t * obj) in theme_apply() argument
201 if(lv_obj_get_parent(obj) == NULL) { in theme_apply()
202 lv_obj_add_style(obj, &styles->scr, 0); in theme_apply()
203 lv_obj_add_style(obj, &styles->scrollbar, LV_PART_SCROLLBAR); in theme_apply()
207 if(lv_obj_check_type(obj, &lv_obj_class)) { in theme_apply()
209 lv_obj_t * parent = lv_obj_get_parent(obj); in theme_apply()
216 lv_obj_add_style(obj, &styles->card, 0); in theme_apply()
217 lv_obj_add_style(obj, &styles->no_radius, 0); in theme_apply()
218 lv_obj_add_style(obj, &styles->scrollbar, LV_PART_SCROLLBAR); in theme_apply()
225 if(lv_obj_get_index(obj) == 0 && lv_obj_check_type(lv_obj_get_parent(obj), &lv_win_class)) { in theme_apply()
226 lv_obj_add_style(obj, &styles->card, 0); in theme_apply()
227 lv_obj_add_style(obj, &styles->no_radius, 0); in theme_apply()
231 … else if(lv_obj_get_index(obj) == 1 && lv_obj_check_type(lv_obj_get_parent(obj), &lv_win_class)) { in theme_apply()
232 lv_obj_add_style(obj, &styles->card, 0); in theme_apply()
233 lv_obj_add_style(obj, &styles->no_radius, 0); in theme_apply()
234 lv_obj_add_style(obj, &styles->scrollbar, LV_PART_SCROLLBAR); in theme_apply()
238 lv_obj_add_style(obj, &styles->card, 0); in theme_apply()
239 lv_obj_add_style(obj, &styles->scrollbar, LV_PART_SCROLLBAR); in theme_apply()
242 else if(lv_obj_check_type(obj, &lv_btn_class)) { in theme_apply()
243 lv_obj_add_style(obj, &styles->card, 0); in theme_apply()
244 lv_obj_add_style(obj, &styles->pr, LV_STATE_PRESSED); in theme_apply()
245 lv_obj_add_style(obj, &styles->inv, LV_STATE_CHECKED); in theme_apply()
246 lv_obj_add_style(obj, &styles->disabled, LV_STATE_DISABLED); in theme_apply()
247 lv_obj_add_style(obj, &styles->focus, LV_STATE_FOCUS_KEY); in theme_apply()
248 lv_obj_add_style(obj, &styles->edit, LV_STATE_EDITED); in theme_apply()
253 else if(lv_obj_check_type(obj, &lv_btnmatrix_class)) { in theme_apply()
255 if(lv_obj_check_type(lv_obj_get_parent(obj), &lv_msgbox_class)) { in theme_apply()
256 lv_obj_add_style(obj, &styles->pad_gap, 0); in theme_apply()
257 lv_obj_add_style(obj, &styles->card, LV_PART_ITEMS); in theme_apply()
258 lv_obj_add_style(obj, &styles->pr, LV_PART_ITEMS | LV_STATE_PRESSED); in theme_apply()
259 lv_obj_add_style(obj, &styles->disabled, LV_PART_ITEMS | LV_STATE_DISABLED); in theme_apply()
260 lv_obj_add_style(obj, &styles->underline, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); in theme_apply()
261 lv_obj_add_style(obj, &styles->large_border, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); in theme_apply()
266 if(lv_obj_check_type(lv_obj_get_parent(obj), &lv_tabview_class)) { in theme_apply()
267 lv_obj_add_style(obj, &styles->pad_gap, 0); in theme_apply()
268 lv_obj_add_style(obj, &styles->card, LV_PART_ITEMS); in theme_apply()
269 lv_obj_add_style(obj, &styles->pr, LV_PART_ITEMS | LV_STATE_PRESSED); in theme_apply()
270 lv_obj_add_style(obj, &styles->inv, LV_PART_ITEMS | LV_STATE_CHECKED); in theme_apply()
271 lv_obj_add_style(obj, &styles->disabled, LV_PART_ITEMS | LV_STATE_DISABLED); in theme_apply()
272 lv_obj_add_style(obj, &styles->focus, LV_STATE_FOCUS_KEY); in theme_apply()
273 lv_obj_add_style(obj, &styles->underline, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); in theme_apply()
274 lv_obj_add_style(obj, &styles->large_border, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); in theme_apply()
278 lv_obj_add_style(obj, &styles->card, 0); in theme_apply()
279 lv_obj_add_style(obj, &styles->focus, LV_STATE_FOCUS_KEY); in theme_apply()
280 lv_obj_add_style(obj, &styles->card, LV_PART_ITEMS); in theme_apply()
281 lv_obj_add_style(obj, &styles->pr, LV_PART_ITEMS | LV_STATE_PRESSED); in theme_apply()
282 lv_obj_add_style(obj, &styles->inv, LV_PART_ITEMS | LV_STATE_CHECKED); in theme_apply()
283 lv_obj_add_style(obj, &styles->disabled, LV_PART_ITEMS | LV_STATE_DISABLED); in theme_apply()
284 lv_obj_add_style(obj, &styles->underline, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); in theme_apply()
285 lv_obj_add_style(obj, &styles->large_border, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); in theme_apply()
290 else if(lv_obj_check_type(obj, &lv_bar_class)) { in theme_apply()
291 lv_obj_add_style(obj, &styles->card, 0); in theme_apply()
292 lv_obj_add_style(obj, &styles->pad_zero, 0); in theme_apply()
293 lv_obj_add_style(obj, &styles->inv, LV_PART_INDICATOR); in theme_apply()
294 lv_obj_add_style(obj, &styles->focus, LV_STATE_FOCUS_KEY); in theme_apply()
299 else if(lv_obj_check_type(obj, &lv_slider_class)) { in theme_apply()
300 lv_obj_add_style(obj, &styles->card, 0); in theme_apply()
301 lv_obj_add_style(obj, &styles->pad_zero, 0); in theme_apply()
302 lv_obj_add_style(obj, &styles->inv, LV_PART_INDICATOR); in theme_apply()
303 lv_obj_add_style(obj, &styles->card, LV_PART_KNOB); in theme_apply()
304 lv_obj_add_style(obj, &styles->radius_circle, LV_PART_KNOB); in theme_apply()
305 lv_obj_add_style(obj, &styles->focus, LV_STATE_FOCUS_KEY); in theme_apply()
306 lv_obj_add_style(obj, &styles->edit, LV_STATE_EDITED); in theme_apply()
311 else if(lv_obj_check_type(obj, &lv_table_class)) { in theme_apply()
312 lv_obj_add_style(obj, &styles->scrollbar, LV_PART_SCROLLBAR); in theme_apply()
313 lv_obj_add_style(obj, &styles->card, LV_PART_ITEMS); in theme_apply()
314 lv_obj_add_style(obj, &styles->no_radius, LV_PART_ITEMS); in theme_apply()
315 lv_obj_add_style(obj, &styles->pr, LV_PART_ITEMS | LV_STATE_PRESSED); in theme_apply()
316 lv_obj_add_style(obj, &styles->focus, LV_STATE_FOCUS_KEY); in theme_apply()
317 lv_obj_add_style(obj, &styles->inv, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); in theme_apply()
318 lv_obj_add_style(obj, &styles->edit, LV_STATE_EDITED); in theme_apply()
323 else if(lv_obj_check_type(obj, &lv_checkbox_class)) { in theme_apply()
324 lv_obj_add_style(obj, &styles->pad_gap, LV_PART_MAIN); in theme_apply()
325 lv_obj_add_style(obj, &styles->card, LV_PART_INDICATOR); in theme_apply()
326 lv_obj_add_style(obj, &styles->disabled, LV_PART_INDICATOR | LV_STATE_DISABLED); in theme_apply()
327 lv_obj_add_style(obj, &styles->inv, LV_PART_INDICATOR | LV_STATE_CHECKED); in theme_apply()
328 lv_obj_add_style(obj, &styles->pr, LV_PART_INDICATOR | LV_STATE_PRESSED); in theme_apply()
329 lv_obj_add_style(obj, &styles->focus, LV_STATE_FOCUS_KEY); in theme_apply()
330 lv_obj_add_style(obj, &styles->edit, LV_STATE_EDITED); in theme_apply()
335 else if(lv_obj_check_type(obj, &lv_switch_class)) { in theme_apply()
336 lv_obj_add_style(obj, &styles->card, 0); in theme_apply()
337 lv_obj_add_style(obj, &styles->radius_circle, 0); in theme_apply()
338 lv_obj_add_style(obj, &styles->pad_zero, 0); in theme_apply()
339 lv_obj_add_style(obj, &styles->inv, LV_PART_INDICATOR); in theme_apply()
340 lv_obj_add_style(obj, &styles->radius_circle, LV_PART_INDICATOR); in theme_apply()
341 lv_obj_add_style(obj, &styles->card, LV_PART_KNOB); in theme_apply()
342 lv_obj_add_style(obj, &styles->radius_circle, LV_PART_KNOB); in theme_apply()
343 lv_obj_add_style(obj, &styles->pad_zero, LV_PART_KNOB); in theme_apply()
344 lv_obj_add_style(obj, &styles->focus, LV_STATE_FOCUS_KEY); in theme_apply()
345 lv_obj_add_style(obj, &styles->edit, LV_STATE_EDITED); in theme_apply()
350 else if(lv_obj_check_type(obj, &lv_chart_class)) { in theme_apply()
351 lv_obj_add_style(obj, &styles->card, 0); in theme_apply()
352 lv_obj_add_style(obj, &styles->scrollbar, LV_PART_SCROLLBAR); in theme_apply()
353 lv_obj_add_style(obj, &styles->card, LV_PART_ITEMS); in theme_apply()
354 lv_obj_add_style(obj, &styles->card, LV_PART_TICKS); in theme_apply()
355 lv_obj_add_style(obj, &styles->card, LV_PART_CURSOR); in theme_apply()
356 lv_obj_add_style(obj, &styles->focus, LV_STATE_FOCUS_KEY); in theme_apply()
361 else if(lv_obj_check_type(obj, &lv_roller_class)) { in theme_apply()
362 lv_obj_add_style(obj, &styles->card, 0); in theme_apply()
363 lv_obj_add_style(obj, &styles->large_line_space, 0); in theme_apply()
364 lv_obj_add_style(obj, &styles->inv, LV_PART_SELECTED); in theme_apply()
365 lv_obj_add_style(obj, &styles->focus, LV_STATE_FOCUS_KEY); in theme_apply()
366 lv_obj_add_style(obj, &styles->edit, LV_STATE_EDITED); in theme_apply()
371 else if(lv_obj_check_type(obj, &lv_dropdown_class)) { in theme_apply()
372 lv_obj_add_style(obj, &styles->card, 0); in theme_apply()
373 lv_obj_add_style(obj, &styles->pr, LV_STATE_PRESSED); in theme_apply()
374 lv_obj_add_style(obj, &styles->focus, LV_STATE_FOCUS_KEY); in theme_apply()
375 lv_obj_add_style(obj, &styles->edit, LV_STATE_EDITED); in theme_apply()
377 else if(lv_obj_check_type(obj, &lv_dropdownlist_class)) { in theme_apply()
378 lv_obj_add_style(obj, &styles->card, 0); in theme_apply()
379 lv_obj_add_style(obj, &styles->large_line_space, 0); in theme_apply()
380 lv_obj_add_style(obj, &styles->scrollbar, LV_PART_SCROLLBAR); in theme_apply()
381 lv_obj_add_style(obj, &styles->inv, LV_PART_SELECTED | LV_STATE_CHECKED); in theme_apply()
382 lv_obj_add_style(obj, &styles->pr, LV_PART_SELECTED | LV_STATE_PRESSED); in theme_apply()
383 lv_obj_add_style(obj, &styles->focus, LV_STATE_FOCUS_KEY); in theme_apply()
384 lv_obj_add_style(obj, &styles->edit, LV_STATE_EDITED); in theme_apply()
389 else if(lv_obj_check_type(obj, &lv_arc_class)) { in theme_apply()
390 lv_obj_add_style(obj, &styles->card, 0); in theme_apply()
391 lv_obj_add_style(obj, &styles->inv, LV_PART_INDICATOR); in theme_apply()
392 lv_obj_add_style(obj, &styles->pad_zero, LV_PART_INDICATOR); in theme_apply()
393 lv_obj_add_style(obj, &styles->card, LV_PART_KNOB); in theme_apply()
394 lv_obj_add_style(obj, &styles->radius_circle, LV_PART_KNOB); in theme_apply()
395 lv_obj_add_style(obj, &styles->focus, LV_STATE_FOCUS_KEY); in theme_apply()
396 lv_obj_add_style(obj, &styles->edit, LV_STATE_EDITED); in theme_apply()
401 else if(lv_obj_check_type(obj, &lv_meter_class)) { in theme_apply()
402 lv_obj_add_style(obj, &styles->card, 0); in theme_apply()
407 else if(lv_obj_check_type(obj, &lv_textarea_class)) { in theme_apply()
408 lv_obj_add_style(obj, &styles->card, 0); in theme_apply()
409 lv_obj_add_style(obj, &styles->scrollbar, LV_PART_SCROLLBAR); in theme_apply()
410 lv_obj_add_style(obj, &styles->ta_cursor, LV_PART_CURSOR | LV_STATE_FOCUSED); in theme_apply()
411 lv_obj_add_style(obj, &styles->focus, LV_STATE_FOCUSED); in theme_apply()
412 lv_obj_add_style(obj, &styles->edit, LV_STATE_EDITED); in theme_apply()
417 else if(lv_obj_check_type(obj, &lv_calendar_class)) { in theme_apply()
418 lv_obj_add_style(obj, &styles->card, 0); in theme_apply()
419 lv_obj_add_style(obj, &styles->no_radius, 0); in theme_apply()
420 lv_obj_add_style(obj, &styles->pr, LV_PART_ITEMS | LV_STATE_PRESSED); in theme_apply()
421 lv_obj_add_style(obj, &styles->disabled, LV_PART_ITEMS | LV_STATE_DISABLED); in theme_apply()
422 lv_obj_add_style(obj, &styles->focus, LV_STATE_FOCUS_KEY); in theme_apply()
423 lv_obj_add_style(obj, &styles->edit, LV_STATE_EDITED); in theme_apply()
424 lv_obj_add_style(obj, &styles->large_border, LV_PART_ITEMS | LV_STATE_FOCUS_KEY); in theme_apply()
429 else if(lv_obj_check_type(obj, &lv_keyboard_class)) { in theme_apply()
430 lv_obj_add_style(obj, &styles->card, 0); in theme_apply()
431 lv_obj_add_style(obj, &styles->card, LV_PART_ITEMS); in theme_apply()
432 lv_obj_add_style(obj, &styles->pr, LV_PART_ITEMS | LV_STATE_PRESSED); in theme_apply()
433 lv_obj_add_style(obj, &styles->inv, LV_PART_ITEMS | LV_STATE_CHECKED); in theme_apply()
434 lv_obj_add_style(obj, &styles->focus, LV_STATE_FOCUS_KEY); in theme_apply()
435 lv_obj_add_style(obj, &styles->edit, LV_STATE_EDITED); in theme_apply()
436 lv_obj_add_style(obj, &styles->large_border, LV_PART_ITEMS | LV_STATE_EDITED); in theme_apply()
440 else if(lv_obj_check_type(obj, &lv_list_class)) { in theme_apply()
441 lv_obj_add_style(obj, &styles->card, 0); in theme_apply()
442 lv_obj_add_style(obj, &styles->scrollbar, LV_PART_SCROLLBAR); in theme_apply()
445 else if(lv_obj_check_type(obj, &lv_list_text_class)) { in theme_apply()
448 else if(lv_obj_check_type(obj, &lv_list_btn_class)) { in theme_apply()
449 lv_obj_add_style(obj, &styles->card, 0); in theme_apply()
450 lv_obj_add_style(obj, &styles->pr, LV_STATE_PRESSED); in theme_apply()
451 lv_obj_add_style(obj, &styles->focus, LV_STATE_FOCUS_KEY); in theme_apply()
452 lv_obj_add_style(obj, &styles->large_border, LV_STATE_EDITED); in theme_apply()
457 else if(lv_obj_check_type(obj, &lv_msgbox_class)) { in theme_apply()
458 lv_obj_add_style(obj, &styles->card, 0); in theme_apply()
463 else if(lv_obj_check_type(obj, &lv_spinbox_class)) { in theme_apply()
464 lv_obj_add_style(obj, &styles->card, 0); in theme_apply()
465 lv_obj_add_style(obj, &styles->inv, LV_PART_CURSOR); in theme_apply()
466 lv_obj_add_style(obj, &styles->focus, LV_STATE_FOCUS_KEY); in theme_apply()
467 lv_obj_add_style(obj, &styles->edit, LV_STATE_EDITED); in theme_apply()
471 else if(lv_obj_check_type(obj, &lv_tileview_class)) { in theme_apply()
472 lv_obj_add_style(obj, &styles->scr, 0); in theme_apply()
473 lv_obj_add_style(obj, &styles->scrollbar, LV_PART_SCROLLBAR); in theme_apply()
475 else if(lv_obj_check_type(obj, &lv_tileview_tile_class)) { in theme_apply()
476 lv_obj_add_style(obj, &styles->scrollbar, LV_PART_SCROLLBAR); in theme_apply()
481 else if(lv_obj_check_type(obj, &lv_led_class)) { in theme_apply()
482 lv_obj_add_style(obj, &styles->card, 0); in theme_apply()