Make namespaces more consistent (#92)

This commit is contained in:
Ken Van Hoeylandt
2024-11-26 18:30:54 +01:00
committed by GitHub
parent ca5d4b8226
commit a312bd5527
75 changed files with 108 additions and 109 deletions
+27
View File
@@ -0,0 +1,27 @@
#include "Style.h"
namespace tt::lvgl {
void obj_set_style_bg_blacken(lv_obj_t* obj) {
lv_obj_set_style_bg_color(obj, lv_color_black(), 0);
lv_obj_set_style_border_color(obj, lv_color_black(), 0);
}
void obj_set_style_bg_invisible(lv_obj_t* obj) {
lv_obj_set_style_bg_opa(obj, 0, 0);
lv_obj_set_style_border_width(obj, 0, 0);
}
void obj_set_style_no_padding(lv_obj_t* obj) {
lv_obj_set_style_pad_all(obj, LV_STATE_DEFAULT, 0);
lv_obj_set_style_pad_gap(obj, LV_STATE_DEFAULT, 0);
}
void obj_set_style_auto_padding(lv_obj_t* obj) {
lv_obj_set_style_pad_top(obj, 8, 0);
lv_obj_set_style_pad_bottom(obj, 8, 0);
lv_obj_set_style_pad_left(obj, 16, 0);
lv_obj_set_style_pad_right(obj, 16, 0);
}
} // namespace