Lines Matching full:if

92     if(_style_custom_prop_flag_lookup_table != NULL) {  in lv_obj_style_deinit()
106 if(style && part == LV_PART_MAIN && style_has_flag(style, LV_STYLE_PROP_FLAG_TRANSFORM)) { in lv_obj_add_style()
116 if(obj->styles[i].is_trans) continue; in lv_obj_add_style()
117 if(obj->styles[i].is_local) continue; in lv_obj_add_style()
138 #if LV_OBJ_STYLE_CACHE in lv_obj_add_style()
140 if(lv_style_is_const(style)) { in lv_obj_add_style()
164 if(!obj || !old_style || !new_style || (old_style == new_style)) { in lv_obj_replace_style()
178 if(obj->styles[i].is_local || obj->styles[i].is_trans) { in lv_obj_replace_style()
183 if((state != LV_STATE_ANY && state_act != state) || in lv_obj_replace_style()
196 if(replaced) { in lv_obj_replace_style()
208 if(style && style->prop_cnt == 0) prop = LV_STYLE_PROP_INV; in lv_obj_remove_style()
210 if(style && part == LV_PART_MAIN && style_has_flag(style, LV_STYLE_PROP_FLAG_TRANSFORM)) { in lv_obj_remove_style()
219 if((state != LV_STATE_ANY && state_act != state) || in lv_obj_remove_style()
226 if(obj->styles[i].is_trans) { in lv_obj_remove_style()
230 if(obj->styles[i].is_local || obj->styles[i].is_trans) { in lv_obj_remove_style()
231 if(obj->styles[i].style) lv_style_reset((lv_style_t *)obj->styles[i].style); in lv_obj_remove_style()
250 if(deleted && prop != LV_STYLE_PROP_INV) { in lv_obj_remove_style()
263 if(!style_refr) return; in lv_obj_report_style_change()
279 if(!style_refr) return; in lv_obj_refresh_style()
292 if(is_layout_refr) { in lv_obj_refresh_style()
293 if(part == LV_PART_ANY || in lv_obj_refresh_style()
301if((part == LV_PART_ANY || part == LV_PART_MAIN) && (prop == LV_STYLE_PROP_ANY || is_layout_refr))… in lv_obj_refresh_style()
303 if(parent) lv_obj_mark_layout_as_dirty(parent); in lv_obj_refresh_style()
307 if((part == LV_PART_ANY || part == LV_PART_MAIN) && is_layer_refr) { in lv_obj_refresh_style()
311 if(prop == LV_STYLE_PROP_ANY || is_ext_draw) { in lv_obj_refresh_style()
316 if(prop == LV_STYLE_PROP_ANY || (is_inheritable && (is_ext_draw || is_layout_refr))) { in lv_obj_refresh_style()
317 if(part != LV_PART_SCROLLBAR) { in lv_obj_refresh_style()
339 if(found == LV_STYLE_RES_FOUND) return value_act; in lv_obj_get_style_prop()
352 if(found == LV_STYLE_RES_FOUND) return true; in lv_obj_has_style_prop()
366 if(selector == LV_PART_MAIN && lv_style_prop_has_flag(prop, LV_STYLE_PROP_FLAG_TRANSFORM)) { in lv_obj_set_local_style_prop()
372 #if LV_OBJ_STYLE_CACHE in lv_obj_set_local_style_prop()
374 if(lv_obj_style_get_selector_part(selector) == LV_PART_MAIN) { in lv_obj_set_local_style_prop()
391 if(obj->styles[i].is_local && in lv_obj_get_local_style_prop()
407 if(obj->styles[i].is_local && in lv_obj_remove_local_style_prop()
414 if(i == obj->style_cnt) return false; in lv_obj_remove_local_style_prop()
417 if(res == LV_RESULT_OK) { in lv_obj_remove_local_style_prop()
438 if(v1.ptr == v2.ptr && v1.num == v2.num && lv_color_eq(v1.color, v2.color)) return; in lv_obj_style_create_transition()
447 if(tr_dsc->prop == LV_STYLE_RADIUS) { in lv_obj_style_create_transition()
448 if(v1.num == LV_RADIUS_CIRCLE || v2.num == LV_RADIUS_CIRCLE) { in lv_obj_style_create_transition()
451 if(v1.num == LV_RADIUS_CIRCLE) v1.num = LV_MIN(whalf + 1, hhalf + 1); in lv_obj_style_create_transition()
452 if(v2.num == LV_RADIUS_CIRCLE) v2.num = LV_MIN(whalf + 1, hhalf + 1); in lv_obj_style_create_transition()
458 if(tr == NULL) return; in lv_obj_style_create_transition()
482 if(obj == NULL) return v; in lv_obj_style_apply_color_filter()
484 if(f && f->filter_cb) { in lv_obj_style_apply_color_filter()
486 if(f_opa != 0) v.color = f->filter_cb(f, v.color, f_opa); in lv_obj_style_apply_color_filter()
498 if(obj->styles[i].is_trans) continue; in lv_obj_style_state_compare()
504 if(valid1 != valid2) { in lv_obj_style_state_compare()
507 …/*If there is layout difference on the main part, return immediately. There is no more serious dif… in lv_obj_style_state_compare()
509 if(lv_style_get_prop(style, LV_STYLE_PAD_TOP, &v))layout_diff = true; in lv_obj_style_state_compare()
510 else if(lv_style_get_prop(style, LV_STYLE_PAD_BOTTOM, &v)) layout_diff = true; in lv_obj_style_state_compare()
511 else if(lv_style_get_prop(style, LV_STYLE_PAD_LEFT, &v)) layout_diff = true; in lv_obj_style_state_compare()
512 else if(lv_style_get_prop(style, LV_STYLE_PAD_RIGHT, &v)) layout_diff = true; in lv_obj_style_state_compare()
513 else if(lv_style_get_prop(style, LV_STYLE_PAD_COLUMN, &v)) layout_diff = true; in lv_obj_style_state_compare()
514 else if(lv_style_get_prop(style, LV_STYLE_PAD_ROW, &v)) layout_diff = true; in lv_obj_style_state_compare()
515 else if(lv_style_get_prop(style, LV_STYLE_LAYOUT, &v)) layout_diff = true; in lv_obj_style_state_compare()
516 else if(lv_style_get_prop(style, LV_STYLE_TRANSLATE_X, &v)) layout_diff = true; in lv_obj_style_state_compare()
517 else if(lv_style_get_prop(style, LV_STYLE_TRANSLATE_Y, &v)) layout_diff = true; in lv_obj_style_state_compare()
518 else if(lv_style_get_prop(style, LV_STYLE_WIDTH, &v)) layout_diff = true; in lv_obj_style_state_compare()
519 else if(lv_style_get_prop(style, LV_STYLE_HEIGHT, &v)) layout_diff = true; in lv_obj_style_state_compare()
520 else if(lv_style_get_prop(style, LV_STYLE_MIN_WIDTH, &v)) layout_diff = true; in lv_obj_style_state_compare()
521 else if(lv_style_get_prop(style, LV_STYLE_MAX_WIDTH, &v)) layout_diff = true; in lv_obj_style_state_compare()
522 else if(lv_style_get_prop(style, LV_STYLE_MIN_HEIGHT, &v)) layout_diff = true; in lv_obj_style_state_compare()
523 else if(lv_style_get_prop(style, LV_STYLE_MAX_HEIGHT, &v)) layout_diff = true; in lv_obj_style_state_compare()
524 else if(lv_style_get_prop(style, LV_STYLE_BORDER_WIDTH, &v)) layout_diff = true; in lv_obj_style_state_compare()
526 if(layout_diff) { in lv_obj_style_state_compare()
531if(lv_style_get_prop(style, LV_STYLE_TRANSFORM_WIDTH, &v)) res = LV_STYLE_STATE_CMP_DIFF_DRAW_PAD; in lv_obj_style_state_compare()
532 …else if(lv_style_get_prop(style, LV_STYLE_TRANSFORM_HEIGHT, &v)) res = LV_STYLE_STATE_CMP_DIFF_DRA… in lv_obj_style_state_compare()
533 …else if(lv_style_get_prop(style, LV_STYLE_TRANSFORM_ROTATION, &v)) res = LV_STYLE_STATE_CMP_DIFF_D… in lv_obj_style_state_compare()
534 …else if(lv_style_get_prop(style, LV_STYLE_TRANSFORM_SCALE_X, &v)) res = LV_STYLE_STATE_CMP_DIFF_DR… in lv_obj_style_state_compare()
535 …else if(lv_style_get_prop(style, LV_STYLE_TRANSFORM_SCALE_Y, &v)) res = LV_STYLE_STATE_CMP_DIFF_DR… in lv_obj_style_state_compare()
536 …else if(lv_style_get_prop(style, LV_STYLE_OUTLINE_OPA, &v)) res = LV_STYLE_STATE_CMP_DIFF_DRAW_PAD; in lv_obj_style_state_compare()
537 …else if(lv_style_get_prop(style, LV_STYLE_OUTLINE_PAD, &v)) res = LV_STYLE_STATE_CMP_DIFF_DRAW_PAD; in lv_obj_style_state_compare()
538 …else if(lv_style_get_prop(style, LV_STYLE_OUTLINE_WIDTH, &v)) res = LV_STYLE_STATE_CMP_DIFF_DRAW_P… in lv_obj_style_state_compare()
539 …else if(lv_style_get_prop(style, LV_STYLE_SHADOW_WIDTH, &v)) res = LV_STYLE_STATE_CMP_DIFF_DRAW_PA… in lv_obj_style_state_compare()
540 … else if(lv_style_get_prop(style, LV_STYLE_SHADOW_OPA, &v)) res = LV_STYLE_STATE_CMP_DIFF_DRAW_PAD; in lv_obj_style_state_compare()
541 …else if(lv_style_get_prop(style, LV_STYLE_SHADOW_OFFSET_X, &v)) res = LV_STYLE_STATE_CMP_DIFF_DRAW… in lv_obj_style_state_compare()
542 …else if(lv_style_get_prop(style, LV_STYLE_SHADOW_OFFSET_Y, &v)) res = LV_STYLE_STATE_CMP_DIFF_DRAW… in lv_obj_style_state_compare()
543 …else if(lv_style_get_prop(style, LV_STYLE_SHADOW_SPREAD, &v)) res = LV_STYLE_STATE_CMP_DIFF_DRAW_P… in lv_obj_style_state_compare()
544 … else if(lv_style_get_prop(style, LV_STYLE_LINE_WIDTH, &v)) res = LV_STYLE_STATE_CMP_DIFF_DRAW_PAD; in lv_obj_style_state_compare()
545 else if(res == LV_STYLE_STATE_CMP_SAME) res = LV_STYLE_STATE_CMP_DIFF_REDRAW; in lv_obj_style_state_compare()
589 if(opa_obj <= LV_OPA_MIN) { in lv_obj_get_style_opa_recursive()
595 if(opa_obj < LV_OPA_MAX) { in lv_obj_get_style_opa_recursive()
599 if(part != LV_PART_MAIN) { in lv_obj_get_style_opa_recursive()
608 if(opa_obj <= LV_OPA_MIN) { in lv_obj_get_style_opa_recursive()
612 if(opa_obj < LV_OPA_MAX) { in lv_obj_get_style_opa_recursive()
619 if(opa_final <= LV_OPA_MIN) { in lv_obj_get_style_opa_recursive()
624 if(opa_final >= LV_OPA_MAX) { in lv_obj_get_style_opa_recursive()
636 if(obj->spec_attr) obj->spec_attr->layer_type = layer_type; in lv_obj_update_layer_type()
637 else if(layer_type != LV_LAYER_TYPE_NONE) { in lv_obj_update_layer_type()
649 * If the local style for the part-state pair doesn't exist allocate and return it.
658 if(obj->styles[i].is_local && in get_local_style()
672 if(obj->styles[i - 1].is_local || obj->styles[i - 1].is_trans) break; in get_local_style()
687 * If the transition style for the part-state pair doesn't exist allocate and return it.
696 if(obj->styles[i].is_trans && obj->styles[i].selector == selector) break; in get_trans_style()
700 if(i != obj->style_cnt) return &obj->styles[i]; in get_trans_style()
733 if(obj_style->is_trans == false) break; in get_prop_core()
734 if(skip_trans) continue; in get_prop_core()
738 if(part_act != part) continue; in get_prop_core()
739 if((obj_style->style->has_group & group) == 0) continue; in get_prop_core()
741 if(found == LV_STYLE_RES_FOUND) { in get_prop_core()
747 if((obj->styles[i].style->has_group & group) == 0) continue; in get_prop_core()
750 if(part_act != part) continue; in get_prop_core()
755 if((state_act & state_inv)) continue; in get_prop_core()
758 if(state_act <= weight) continue; in get_prop_core()
761 if(found == LV_STYLE_RES_FOUND) { in get_prop_core()
762 if(state_act == state) { in get_prop_core()
769 if(weight >= 0) return LV_STYLE_RES_FOUND; in get_prop_core()
782 if(style == NULL || obj->styles[i].style == style) { in report_style_change_core()
821 * @param tr_limit delete transitions only "older" than this. `NULL` if not used
830 if(tr == tr_limit) break; in trans_delete()
835if(tr->obj == obj && (part == tr->selector || part == LV_PART_ANY) && (prop == tr->prop || prop ==… in trans_delete()
840if(obj->styles[i].is_trans && (part == LV_PART_ANY || obj->styles[i].selector == part)) { in trans_delete()
864 if(obj->styles[i].is_trans == 0 || obj->styles[i].selector != tr->selector) continue; in trans_anim_cb()
872 if(v < 255) value_final.num = tr->start_value.num; in trans_anim_cb()
877 if(v < 255) value_final.ptr = tr->start_value.ptr; in trans_anim_cb()
881 if(tr->start_value.ptr == NULL) value_final.ptr = tr->end_value.ptr; in trans_anim_cb()
882 else if(tr->end_value.ptr == NULL) value_final.ptr = tr->start_value.ptr; in trans_anim_cb()
883 else if(v < 128) value_final.ptr = tr->start_value.ptr; in trans_anim_cb()
893 if(v <= 0) value_final.color = tr->start_value.color; in trans_anim_cb()
894 else if(v >= 255) value_final.color = tr->end_value.color; in trans_anim_cb()
899 if(v == 0) value_final.num = tr->start_value.num; in trans_anim_cb()
900 else if(v == 255) value_final.num = tr->end_value.num; in trans_anim_cb()
907 if(lv_style_get_prop(obj->styles[i].style, tr->prop, &old_value)) { in trans_anim_cb()
908if(value_final.ptr == old_value.ptr && lv_color_eq(value_final.color, old_value.color) && in trans_anim_cb()
914 if(refr) lv_obj_refresh_style(tr->obj, tr->selector, tr->prop); in trans_anim_cb()
932 /*Delete the related transitions if any*/ in trans_anim_start_cb()
951 *if there no more transitions for this property in trans_anim_completed_cb()
956if(tr_i != tr && tr_i->obj == tr->obj && tr_i->selector == tr->selector && tr_i->prop == tr->prop)… in trans_anim_completed_cb()
962 if(!running) { in trans_anim_completed_cb()
965 if(obj->styles[i].is_trans && obj->styles[i].selector == tr->selector) { in trans_anim_completed_cb()
972 if(lv_style_is_empty(obj->styles[i].style)) { in trans_anim_completed_cb()
984 #if LV_DRAW_TRANSFORM_USE_MATRIX in calculate_layer_type()
985 if(lv_obj_get_transform(obj) != NULL) return LV_LAYER_TYPE_TRANSFORM; in calculate_layer_type()
987 if(lv_obj_get_style_transform_rotation(obj, 0) != 0) return LV_LAYER_TYPE_TRANSFORM; in calculate_layer_type()
988 if(lv_obj_get_style_transform_scale_x(obj, 0) != 256) return LV_LAYER_TYPE_TRANSFORM; in calculate_layer_type()
989 if(lv_obj_get_style_transform_scale_y(obj, 0) != 256) return LV_LAYER_TYPE_TRANSFORM; in calculate_layer_type()
990 if(lv_obj_get_style_transform_skew_x(obj, 0) != 0) return LV_LAYER_TYPE_TRANSFORM; in calculate_layer_type()
991 if(lv_obj_get_style_transform_skew_y(obj, 0) != 0) return LV_LAYER_TYPE_TRANSFORM; in calculate_layer_type()
992 if(lv_obj_get_style_opa_layered(obj, 0) != LV_OPA_COVER) return LV_LAYER_TYPE_SIMPLE; in calculate_layer_type()
993 if(lv_obj_get_style_bitmap_mask_src(obj, 0) != NULL) return LV_LAYER_TYPE_SIMPLE; in calculate_layer_type()
994 if(lv_obj_get_style_blend_mode(obj, 0) != LV_BLEND_MODE_NORMAL) return LV_LAYER_TYPE_SIMPLE; in calculate_layer_type()
1000 #if LV_OBJ_STYLE_CACHE in full_cache_refresh()
1002 if(part == LV_PART_MAIN || part == LV_PART_ANY) { in full_cache_refresh()
1005 if(lv_obj_style_get_selector_part(obj->styles[i].selector) != LV_PART_MAIN) continue; in full_cache_refresh()
1008 if(lv_style_is_const(style)) { in full_cache_refresh()
1022 if(part != LV_PART_MAIN || part == LV_PART_ANY) { in full_cache_refresh()
1025 if(lv_obj_style_get_selector_part(obj->styles[i].selector) == LV_PART_MAIN) continue; in full_cache_refresh()
1028 if(lv_style_is_const(style)) { in full_cache_refresh()
1060 if(lv_style_is_const(style)) { in style_has_flag()
1064 if(lv_style_prop_has_flag(props[i].prop, flag)) { in style_has_flag()
1073 if(lv_style_prop_has_flag(props[i], flag)) { in style_has_flag()
1088 #if LV_OBJ_STYLE_CACHE in get_selector_style_prop()
1090if((part == LV_PART_MAIN ? obj->style_main_prop_is_set : obj->style_other_prop_is_set) & prop_shif… in get_selector_style_prop()
1094 if(found == LV_STYLE_RES_FOUND) return LV_STYLE_RES_FOUND; in get_selector_style_prop()
1099 if(prop < LV_STYLE_NUM_BUILT_IN_PROPS) { in get_selector_style_prop()
1103 if(_style_custom_prop_flag_lookup_table != NULL) { in get_selector_style_prop()
1109 if(inheritable) { in get_selector_style_prop()
1110 /*If not found, check the `MAIN` style first, if already on the MAIN part go to the parent*/ in get_selector_style_prop()
1111 if(part != LV_PART_MAIN) part = LV_PART_MAIN; in get_selector_style_prop()
1115 #if LV_OBJ_STYLE_CACHE in get_selector_style_prop()
1116 if(obj->style_main_prop_is_set & prop_shifted) in get_selector_style_prop()
1121 if(found == LV_STYLE_RES_FOUND) return LV_STYLE_RES_FOUND; in get_selector_style_prop()
1130 if(part == LV_PART_MAIN && (prop == LV_STYLE_WIDTH || prop == LV_STYLE_HEIGHT)) { in get_selector_style_prop()
1133 if(prop == LV_STYLE_WIDTH) { in get_selector_style_prop()
1134 if(cls->width_def != 0) { in get_selector_style_prop()
1140 if(cls->height_def != 0) { in get_selector_style_prop()