commit 54f17a7de8dc3b5749cedeea87d58cd7cb4a38fc
parent 2b7086c35c106ce538d471c4448c2d9ae92076fc
Author: Manuel Geissbühler <manuel@debian>
Date: Sat, 28 Dec 2024 09:42:22 +0100
testing
Diffstat:
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/src/gui/screen.hpp b/src/gui/screen.hpp
@@ -10,6 +10,7 @@
#include <src/layouts/lv_layout.h>
#include <src/misc/lv_area.h>
#include <src/misc/lv_color.h>
+#include <src/misc/lv_style.h>
#include <src/misc/lv_style_gen.h>
#include <src/widgets/button/lv_button.h>
#include <src/widgets/label/lv_label.h>
@@ -80,10 +81,18 @@ class Screen {
color.red = 0;
lv_obj_set_style_bg_color(mainContentContainer, color, 0);
-
- lv_obj_set_layout(buttonsContainer, LV_LAYOUT_FLEX);
- lv_obj_set_flex_flow(buttonsContainer, LV_FLEX_FLOW_COLUMN_REVERSE);
- lv_obj_set_flex_align(buttonsContainer, LV_FLEX_ALIGN_END, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_SPACE_EVENLY);
+ //set style & flow of buttons
+ lv_style_t buttonsContainerStyle;
+ lv_style_init(&buttonsContainerStyle);
+ lv_style_set_flex_flow(&buttonsContainerStyle, LV_FLEX_FLOW_COLUMN_REVERSE);
+ lv_style_set_flex_main_place(&buttonsContainerStyle, LV_FLEX_ALIGN_END);
+ lv_style_set_flex_cross_place(&buttonsContainerStyle, LV_FLEX_ALIGN_CENTER);
+ lv_style_set_layout(&buttonsContainerStyle, LV_LAYOUT_FLEX);
+ lv_style_set_pad_column(&buttonsContainerStyle, 0);
+
+ //lv_obj_set_layout(buttonsContainer, LV_LAYOUT_FLEX);
+ //lv_obj_set_flex_flow(buttonsContainer, LV_FLEX_FLOW_COLUMN_REVERSE);
+ //lv_obj_set_flex_align(buttonsContainer, LV_FLEX_ALIGN_END, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_SPACE_EVENLY);
//add 3 buttons for testing purposes
lv_obj_t *button;