From c43fafe1e6c4e88b9f4b14f200315418e35dc61c Mon Sep 17 00:00:00 2001 From: Phil Mitchell Date: Thu, 23 Mar 2023 21:46:10 +1100 Subject: [PATCH] Fix position of new line on Inputs and Mixes pages. --- radio/src/gui/colorlcd/model_inputs.cpp | 3 ++- radio/src/gui/colorlcd/model_mixes.cpp | 7 ++++--- radio/src/gui/colorlcd/radio_setup.cpp | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/radio/src/gui/colorlcd/model_inputs.cpp b/radio/src/gui/colorlcd/model_inputs.cpp index a86cbd8d6bb..8ffb43de056 100644 --- a/radio/src/gui/colorlcd/model_inputs.cpp +++ b/radio/src/gui/colorlcd/model_inputs.cpp @@ -444,7 +444,8 @@ void ModelInputsPage::build(FormWindow *window) { window->setFlexLayout(LV_FLEX_FLOW_COLUMN, 3); - form = window; + form = new FormWindow(window, rect_t{}); + form->setFlexLayout(LV_FLEX_FLOW_COLUMN, 3); groups.clear(); lines.clear(); diff --git a/radio/src/gui/colorlcd/model_mixes.cpp b/radio/src/gui/colorlcd/model_mixes.cpp index bb0e27196b5..dbc4be13e0b 100644 --- a/radio/src/gui/colorlcd/model_mixes.cpp +++ b/radio/src/gui/colorlcd/model_mixes.cpp @@ -515,7 +515,8 @@ void ModelMixesPage::build(FormWindow * window) window->setFlexLayout(LV_FLEX_FLOW_COLUMN, 3); - form = window; + form = new FormWindow(window, rect_t{}); + form->setFlexLayout(LV_FLEX_FLOW_COLUMN, 3); groups.clear(); lines.clear(); @@ -542,7 +543,7 @@ void ModelMixesPage::build(FormWindow * window) } } - auto box = new FormGroup(form, rect_t{}); + auto box = new FormGroup(window, rect_t{}); box->setFlexLayout(LV_FLEX_FLOW_ROW, lv_dpx(8)); box->padLeft(lv_dpx(8)); @@ -555,7 +556,7 @@ void ModelMixesPage::build(FormWindow * window) box, rect_t{}, [=]() { return showMonitors; }, [=](uint8_t val) { enableMonitors(val); }); - auto btn = new TextButton(form, rect_t{}, LV_SYMBOL_PLUS, [=]() { + auto btn = new TextButton(window, rect_t{}, LV_SYMBOL_PLUS, [=]() { newMix(); return 0; }); diff --git a/radio/src/gui/colorlcd/radio_setup.cpp b/radio/src/gui/colorlcd/radio_setup.cpp index 67daeb2a846..4a2ac6f5801 100644 --- a/radio/src/gui/colorlcd/radio_setup.cpp +++ b/radio/src/gui/colorlcd/radio_setup.cpp @@ -702,7 +702,7 @@ void RadioSetupPage::build(FormWindow * window) // RX channel order line = window->newLine(&grid); - new StaticText(line, rect_t{}, STR_RXCHANNELORD, 0, + new StaticText(line, rect_t{}, STR_DEF_CHAN_ORD, 0, COLOR_THEME_PRIMARY1); // RAET->AETR choice = new Choice(line, rect_t{}, 0, 4 * 3 * 2 - 1, GET_SET_DEFAULT(g_eeGeneral.templateSetup));