* Helps with button expansion and also with vertical alignment of content, * as the parent flex doesn't allow for vertical alignment */
| 39 | * as the parent flex doesn't allow for vertical alignment |
| 40 | */ |
| 41 | static lv_obj_t* create_action_wrapper(lv_obj_t* parent, UiDensity ui_density) { |
| 42 | auto* wrapper = lv_obj_create(parent); |
| 43 | auto toolbar_height = getToolbarHeight(ui_density); |
| 44 | lv_obj_set_size(wrapper, LV_SIZE_CONTENT, toolbar_height); |
| 45 | |
| 46 | auto icon_padding = getActionIconPadding(ui_density); |
| 47 | auto icon_padding_half = icon_padding / 2; |
| 48 | |
| 49 | lv_obj_set_style_pad_all(wrapper, icon_padding_half, LV_STATE_DEFAULT); // For selection and touch animation |
| 50 | lv_obj_set_style_bg_opa(wrapper, 0, LV_STATE_DEFAULT); |
| 51 | lv_obj_set_style_border_width(wrapper, 0, LV_STATE_DEFAULT); |
| 52 | lv_obj_set_style_border_opa(wrapper, 0, LV_STATE_DEFAULT); |
| 53 | |
| 54 | return wrapper; |
| 55 | } |
| 56 | |
| 57 | typedef struct { |
| 58 | lv_obj_t obj; |
no test coverage detected