cash2ecash

cash2ecash: cash acceptor that issues digital cash (experimental)
Log | Files | Refs | Submodules | README | LICENSE

commit 2b7086c35c106ce538d471c4448c2d9ae92076fc
parent acf688d137096fdc8bf47c73c9b8b810acb4d5a6
Author: Manuel Geissbühler <manuel@debian>
Date:   Sat, 28 Dec 2024 09:28:48 +0100

testing

Diffstat:
Msrc/gui/screen.hpp | 11+++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/gui/screen.hpp b/src/gui/screen.hpp @@ -80,7 +80,10 @@ 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); //add 3 buttons for testing purposes lv_obj_t *button; @@ -89,16 +92,12 @@ class Screen { for (i=0; i<3; i++) { button = lv_button_create(buttonsContainer); buttons.push_back(button); + lv_obj_set_size(button, LV_PCT(100),72); label = lv_label_create(button); lv_label_set_text_fmt(label, "button %d", i); lv_obj_center(label); } - - lv_obj_set_layout(buttonsContainer, LV_LAYOUT_FLEX); - lv_obj_set_flex_flow(buttonsContainer, LV_FLEX_FLOW_ROW_REVERSE); - lv_obj_set_flex_align(buttonsContainer, LV_FLEX_ALIGN_END, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_SPACE_EVENLY); - //add the buttons to the layout for (lv_obj_t* x : buttons) {