From 5ceea0df0aa5a54a3fa8a28a6945de5aee7b6718 Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Mon, 23 May 2022 09:25:07 +0200 Subject: [PATCH] flight modes: use 2x5 table in portrait orientation --- radio/src/gui/colorlcd/model_flightmodes.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/radio/src/gui/colorlcd/model_flightmodes.cpp b/radio/src/gui/colorlcd/model_flightmodes.cpp index 45c74dccd..739ccf97b 100644 --- a/radio/src/gui/colorlcd/model_flightmodes.cpp +++ b/radio/src/gui/colorlcd/model_flightmodes.cpp @@ -294,8 +294,8 @@ ModelFlightModesPage::ModelFlightModesPage(): { } +#if LCD_W > LCD_H // FM table: 3 x 3 - static const lv_coord_t fmt_col_dsc[] = {LV_GRID_FR(1), LV_GRID_FR(1), LV_GRID_FR(1), @@ -305,6 +305,19 @@ static const lv_coord_t fmt_row_dsc[] = {LV_GRID_CONTENT, LV_GRID_CONTENT, LV_GRID_CONTENT, LV_GRID_TEMPLATE_LAST}; +#else +// FM table: 2 x 5 +static const lv_coord_t fmt_col_dsc[] = {LV_GRID_FR(1), + LV_GRID_FR(1), + LV_GRID_TEMPLATE_LAST}; + +static const lv_coord_t fmt_row_dsc[] = {LV_GRID_CONTENT, + LV_GRID_CONTENT, + LV_GRID_CONTENT, + LV_GRID_CONTENT, + LV_GRID_CONTENT, + LV_GRID_TEMPLATE_LAST}; +#endif void ModelFlightModesPage::build(FormWindow * window) {