Merge develop into main (#338)

### Cardputer:
- Fix keyboard issue with up/down button conflict when selecting switch
- Fix backlight flickering

### UI improvements
- Removed a 3 pixel border that went around the entire desktop environment
- Improved system layout (GuiService)
- Statusbar: improved layout (mainly margin/padding)
- Toolbar: fixed margin/padding of all buttons, fixed alignment of all content
- Improved layout/UI of many apps

### Other
- Update LVGL to 9.3.0 official release (was dev version)
This commit is contained in:
Ken Van Hoeylandt
2025-09-16 23:12:07 +02:00
committed by GitHub
parent 53b711584f
commit a2af95b92d
30 changed files with 362 additions and 495 deletions
+15 -9
View File
@@ -1,4 +1,4 @@
#include "Tactility/service/loader/Loader.h"
#include <Tactility/service/loader/Loader.h>
#include <Tactility/Assets.h>
#include <Tactility/app/gpio/GpioHal.h>
#include "Tactility/lvgl/Toolbar.h"
@@ -119,11 +119,17 @@ void GpioApp::onShow(AppContext& app, lv_obj_t* parent) {
lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0);
// Main content wrapper, enables scrolling content without scrolling the toolbar
auto* wrapper = lv_obj_create(parent);
lv_obj_set_width(wrapper, LV_PCT(100));
lv_obj_set_flex_grow(wrapper, 1);
lv_obj_set_style_border_width(wrapper, 0, LV_STATE_DEFAULT);
lv_obj_set_style_pad_all(wrapper, 0, LV_STATE_DEFAULT);
auto* expansion_wrapper = lv_obj_create(parent);
lv_obj_set_width(expansion_wrapper, LV_PCT(100));
lv_obj_set_flex_grow(expansion_wrapper, 1);
lv_obj_set_style_border_width(expansion_wrapper, 0, LV_STATE_DEFAULT);
lv_obj_set_style_pad_all(expansion_wrapper, 0, LV_STATE_DEFAULT);
auto* centering_wrapper = lv_obj_create(expansion_wrapper);
lv_obj_set_size(centering_wrapper, LV_SIZE_CONTENT, LV_SIZE_CONTENT);
lv_obj_set_align(centering_wrapper, LV_ALIGN_CENTER);
lv_obj_set_style_border_width(centering_wrapper, 0, LV_STATE_DEFAULT);
lv_obj_set_style_pad_all(centering_wrapper, 0, LV_STATE_DEFAULT);
auto* display = lv_obj_get_display(parent);
auto horizontal_px = lv_display_get_horizontal_resolution(display);
@@ -134,14 +140,14 @@ void GpioApp::onShow(AppContext& app, lv_obj_t* parent) {
const auto square_spacing = getSquareSpacing(ui_scale);
int32_t x_spacing = block_width + square_spacing;
uint8_t column = 0;
const uint8_t offset_from_left_label = 4;
const uint8_t column_limit = is_landscape_display ? 10 : 5;
auto* row_wrapper = createGpioRowWrapper(wrapper);
auto* row_wrapper = createGpioRowWrapper(centering_wrapper);
lv_obj_align(row_wrapper, LV_ALIGN_TOP_MID, 0, 0);
mutex.lock();
for (int i = GPIO_NUM_MIN; i < GPIO_NUM_MAX; ++i) {
constexpr uint8_t offset_from_left_label = 4;
// Add the GPIO number before the first item on a row
if (column == 0) {
@@ -165,7 +171,7 @@ void GpioApp::onShow(AppContext& app, lv_obj_t* parent) {
lv_obj_set_pos(postfix, (column + 1) * x_spacing + offset_from_left_label, 0);
// Add a new row wrapper underneath the last one
auto* new_row_wrapper = createGpioRowWrapper(wrapper);
auto* new_row_wrapper = createGpioRowWrapper(centering_wrapper);
lv_obj_align_to(new_row_wrapper, row_wrapper, LV_ALIGN_BOTTOM_LEFT, 0, square_spacing);
row_wrapper = new_row_wrapper;