Radio setup: prevent scrolling with wrap boxes
This commit is contained in:
@@ -29,19 +29,18 @@ static const lv_coord_t col_dsc[] = {LV_GRID_FR(1), LV_GRID_FR(3),
|
||||
|
||||
static const lv_coord_t row_dsc[] = {LV_GRID_CONTENT, LV_GRID_TEMPLATE_LAST};
|
||||
|
||||
InternalModuleWindow::InternalModuleWindow(Window *parent, const rect_t &rect) :
|
||||
FormGroup(parent, rect, FORWARD_SCROLL),
|
||||
InternalModuleWindow::InternalModuleWindow(Window *parent) :
|
||||
FormGroup::Line(parent),
|
||||
lastModule(g_eeGeneral.internalModule)
|
||||
{
|
||||
setFlexLayout();
|
||||
|
||||
FlexGridLayout grid(col_dsc, row_dsc, 2);
|
||||
auto line = newLine(&grid);
|
||||
setLayout(&grid);
|
||||
|
||||
new StaticText(line, rect_t{}, STR_MODE, 0, COLOR_THEME_PRIMARY1);
|
||||
new StaticText(this, rect_t{}, STR_MODE, 0, COLOR_THEME_PRIMARY1);
|
||||
|
||||
auto box = new FormGroup(line, rect_t{});
|
||||
auto box = new FormGroup(this, rect_t{});
|
||||
box->setFlexLayout(LV_FLEX_FLOW_ROW, lv_dpx(8));
|
||||
lv_obj_set_style_grid_cell_x_align(box->getLvObj(), LV_GRID_ALIGN_STRETCH, 0);
|
||||
|
||||
auto internalModule = new Choice(
|
||||
box, rect_t{}, STR_INTERNAL_MODULE_PROTOCOLS, MODULE_TYPE_NONE,
|
||||
@@ -56,6 +55,7 @@ InternalModuleWindow::InternalModuleWindow(Window *parent, const rect_t &rect) :
|
||||
box->setFlexLayout(LV_FLEX_FLOW_ROW, lv_dpx(8));
|
||||
|
||||
br_box = box->getLvObj();
|
||||
lv_obj_set_width(br_box, LV_SIZE_CONTENT);
|
||||
lv_obj_set_style_flex_cross_place(br_box, LV_FLEX_ALIGN_CENTER, 0);
|
||||
|
||||
new StaticText(box, rect_t{}, STR_BAUDRATE, 0, COLOR_THEME_PRIMARY1);
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
|
||||
#include "form.h"
|
||||
|
||||
class InternalModuleWindow : public FormGroup
|
||||
class InternalModuleWindow : public FormGroup::Line
|
||||
{
|
||||
public:
|
||||
InternalModuleWindow(Window *parent, const rect_t &rect);
|
||||
InternalModuleWindow(Window *parent);
|
||||
|
||||
protected:
|
||||
uint8_t lastModule = 0;
|
||||
|
||||
@@ -47,6 +47,7 @@ SerialConfigWindow::SerialConfigWindow(Window *parent, const rect_t &rect) :
|
||||
|
||||
auto box = new FormGroup(line, rect_t{});
|
||||
box->setFlexLayout(LV_FLEX_FLOW_ROW, lv_dpx(8));
|
||||
lv_obj_set_style_grid_cell_x_align(box->getLvObj(), LV_GRID_ALIGN_STRETCH, 0);
|
||||
lv_obj_set_style_flex_cross_place(box->getLvObj(), LV_FLEX_ALIGN_CENTER, 0);
|
||||
|
||||
auto aux = new Choice(
|
||||
|
||||
@@ -172,6 +172,7 @@ void RadioHardwarePage::build(FormWindow * window)
|
||||
|
||||
auto box = new FormGroup(line, rect_t{});
|
||||
box->setFlexLayout(LV_FLEX_FLOW_ROW, lv_dpx(4));
|
||||
lv_obj_set_style_grid_cell_x_align(box->getLvObj(), LV_GRID_ALIGN_STRETCH, 0);
|
||||
|
||||
auto batMin =
|
||||
new NumberEdit(box, rect_t{}, -60 + 90, g_eeGeneral.vBatMax + 29 + 90,
|
||||
@@ -214,6 +215,7 @@ void RadioHardwarePage::build(FormWindow * window)
|
||||
|
||||
box = new FormGroup(line, rect_t{});
|
||||
box->setFlexLayout(LV_FLEX_FLOW_ROW, lv_dpx(8));
|
||||
lv_obj_set_style_grid_cell_x_align(box->getLvObj(), LV_GRID_ALIGN_STRETCH, 0);
|
||||
lv_obj_set_style_flex_cross_place(box->getLvObj(), LV_FLEX_ALIGN_CENTER, 0);
|
||||
new CheckBox(box, rect_t{}, GET_SET_INVERTED(g_eeGeneral.disableRtcWarning ));
|
||||
|
||||
@@ -230,7 +232,7 @@ void RadioHardwarePage::build(FormWindow * window)
|
||||
|
||||
#if defined(HARDWARE_INTERNAL_MODULE)
|
||||
new Subtitle(window, rect_t{}, TR_INTERNALRF, 0, COLOR_THEME_PRIMARY1);
|
||||
auto mod = new InternalModuleWindow(window, rect_t{});
|
||||
auto mod = new InternalModuleWindow(window);
|
||||
mod->padLeft(lv_dpx(8));
|
||||
#endif
|
||||
|
||||
|
||||
Vendored
+1
-1
Submodule radio/src/thirdparty/libopenui updated: dc82d5adea...408398d4cc
Reference in New Issue
Block a user