1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

feat(obj) remove lv_obj_get_width/height_visible

They can be replaced by  max/min-width/height
This commit is contained in:
Gabor Kiss-Vamosi 2021-04-19 22:11:06 +02:00
parent 5b3df13366
commit 8cb2cbff81
2 changed files with 0 additions and 46 deletions

View File

@ -549,34 +549,6 @@ void lv_obj_get_coords_fit(const lv_obj_t * obj, lv_area_t * area)
}
lv_coord_t lv_obj_get_height_visible(const lv_obj_t * obj)
{
lv_obj_update_layout(obj);
lv_coord_t h = LV_COORD_MAX;
lv_obj_t * parent = lv_obj_get_parent(obj);
while(parent) {
h = LV_MIN(lv_obj_get_height_fit(parent), h);
parent = lv_obj_get_parent(parent);
}
return h == LV_COORD_MAX ? LV_DPI_DEF : h;
}
lv_coord_t lv_obj_get_width_visible(const lv_obj_t * obj)
{
lv_obj_update_layout(obj);
lv_coord_t w = LV_COORD_MAX;
lv_obj_t * parent = lv_obj_get_parent(obj);
while(parent) {
w = LV_MIN(lv_obj_get_width_fit(parent), w);
parent = lv_obj_get_parent(parent);
}
return w == LV_COORD_MAX ? LV_DPI_DEF : w;
}
lv_coord_t lv_obj_get_self_width(struct _lv_obj_t * obj)
{
lv_point_t p = {0, LV_COORD_MIN};

View File

@ -255,24 +255,6 @@ lv_coord_t lv_obj_get_height_fit(const struct _lv_obj_t * obj);
*/
void lv_obj_get_coords_fit(const struct _lv_obj_t * obj, lv_area_t * area);
/**
* Get the height which is visible on the the given object without causing overflow.
* If there are smaller grand parents than their height will be considered.
* Useful on nested scrollable objects to get a height that fills the entire visible height.
* @param obj pointer to an object
* @return the visible height
*/
lv_coord_t lv_obj_get_height_visible(const struct _lv_obj_t * obj);
/**
* Get the widht which is visible on the the given object without causing overflow.
* If there are smaller grand parents than their width will be considered.
* Useful on nested scrollable objects to get a width that fills the entire visible width.
* @param obj pointer to an object
* @return the visible width
*/
lv_coord_t lv_obj_get_width_visible(const struct _lv_obj_t * obj);
/**
* Get the width occupied by the "parts" of the widget. E.g. the width of all columns of a table.
* @param obj pointer to an objects