Skip to main content

lv_obj_calc_dynamic_width

Function lv_obj_calc_dynamic_width 

Source
pub unsafe extern "C" fn lv_obj_calc_dynamic_width(
    obj: *mut lv_obj_t,
    prop: lv_style_prop_t,
) -> i32
Expand description

@brief Calculates the width in pixels of an LVGL object based on its style and parent for a given width prop. @param obj Pointer to the LVGL object whose width is being calculated. @param prop Which style width to calculate for. Valid values are: LV_STYLE_WIDTH, LV_STYLE_MIN_WIDTH, or LV_STYLE_MAX_WIDTH. @return The computed width for the object: @note If the style width is a fixed value, that value is returned. @note If the style width is LV_SIZE_CONTENT, the content width is calculated and returned. @note If the style width is a LV_PCT(), the percentage is applied to the parent’s width.