Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feat(obj) add lv_obj_get_x/y_aligned
fixes #2438
  • Loading branch information
kisvegabor committed Aug 11, 2021
1 parent 8f0b5ab commit 98bc1fe
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/core/lv_obj_style.h
Expand Up @@ -222,6 +222,16 @@ static inline void lv_obj_set_style_size(struct _lv_obj_t * obj, lv_coord_t val

lv_text_align_t lv_obj_calculate_style_text_align(const struct _lv_obj_t * obj, lv_part_t part, const char * txt);

static inline lv_coord_t lv_obj_get_x_aligned(const struct _lv_obj_t * obj)
{
return lv_obj_get_style_x(obj, LV_PART_MAIN);
}

static inline lv_coord_t lv_obj_get_y_aligned(const struct _lv_obj_t * obj)
{
return lv_obj_get_style_y(obj, LV_PART_MAIN);
}

/**********************
* MACROS
**********************/
Expand Down

0 comments on commit 98bc1fe

Please sign in to comment.