Space buttons evenly
This commit is contained in:
committed by
Raphael Coeffic
parent
a7305c3a69
commit
9a8e12db20
@@ -263,8 +263,9 @@ void ModelSetupPage::build(FormWindow * window)
|
|||||||
// Timer buttons
|
// Timer buttons
|
||||||
form = new FormGroup(window, rect_t{});
|
form = new FormGroup(window, rect_t{});
|
||||||
form->setFlexLayout(LV_FLEX_FLOW_ROW_WRAP, lv_dpx(8));
|
form->setFlexLayout(LV_FLEX_FLOW_ROW_WRAP, lv_dpx(8));
|
||||||
lv_obj_set_style_pad_all(form->getLvObj(), lv_dpx(8), 0);
|
lv_obj_set_style_flex_main_place(form->getLvObj(), LV_FLEX_ALIGN_SPACE_EVENLY, 0);
|
||||||
|
form->padAll(lv_dpx(8));
|
||||||
|
|
||||||
new SubScreenButton(form, TR_TIMER "1",
|
new SubScreenButton(form, TR_TIMER "1",
|
||||||
[]() { new TimerWindow(0); });
|
[]() { new TimerWindow(0); });
|
||||||
new SubScreenButton(form, TR_TIMER "2",
|
new SubScreenButton(form, TR_TIMER "2",
|
||||||
@@ -274,7 +275,8 @@ void ModelSetupPage::build(FormWindow * window)
|
|||||||
|
|
||||||
form = new FormGroup(window, rect_t{});
|
form = new FormGroup(window, rect_t{});
|
||||||
form->setFlexLayout(LV_FLEX_FLOW_ROW_WRAP, lv_dpx(8));
|
form->setFlexLayout(LV_FLEX_FLOW_ROW_WRAP, lv_dpx(8));
|
||||||
lv_obj_set_style_pad_all(form->getLvObj(), lv_dpx(8), 0);
|
lv_obj_set_style_flex_main_place(form->getLvObj(), LV_FLEX_ALIGN_SPACE_EVENLY, 0);
|
||||||
|
form->padAll(lv_dpx(8));
|
||||||
|
|
||||||
new SubScreenButton(form, STR_PREFLIGHT,
|
new SubScreenButton(form, STR_PREFLIGHT,
|
||||||
[]() { new PreflightChecks(); });
|
[]() { new PreflightChecks(); });
|
||||||
|
|||||||
@@ -248,9 +248,10 @@ void RadioHardwarePage::build(FormWindow * window)
|
|||||||
|
|
||||||
box = new FormGroup(window, rect_t{});
|
box = new FormGroup(window, rect_t{});
|
||||||
box->setFlexLayout(LV_FLEX_FLOW_ROW_WRAP, lv_dpx(8));
|
box->setFlexLayout(LV_FLEX_FLOW_ROW_WRAP, lv_dpx(8));
|
||||||
|
lv_obj_set_style_flex_main_place(box->getLvObj(), LV_FLEX_ALIGN_SPACE_EVENLY, 0);
|
||||||
box->padRow(lv_dpx(8));
|
box->padRow(lv_dpx(8));
|
||||||
box->padAll(lv_dpx(8));
|
box->padAll(lv_dpx(8));
|
||||||
|
|
||||||
auto calib = new TextButton(box, rect_t{}, STR_CALIBRATION);
|
auto calib = new TextButton(box, rect_t{}, STR_CALIBRATION);
|
||||||
calib->setPressHandler([=]() -> uint8_t {
|
calib->setPressHandler([=]() -> uint8_t {
|
||||||
new RadioCalibrationPage();
|
new RadioCalibrationPage();
|
||||||
@@ -281,6 +282,7 @@ void RadioHardwarePage::build(FormWindow * window)
|
|||||||
|
|
||||||
box = new FormGroup(window, rect_t{});
|
box = new FormGroup(window, rect_t{});
|
||||||
box->setFlexLayout(LV_FLEX_FLOW_ROW_WRAP, lv_dpx(8));
|
box->setFlexLayout(LV_FLEX_FLOW_ROW_WRAP, lv_dpx(8));
|
||||||
|
lv_obj_set_style_flex_main_place(box->getLvObj(), LV_FLEX_ALIGN_SPACE_EVENLY, 0);
|
||||||
box->padRow(lv_dpx(8));
|
box->padRow(lv_dpx(8));
|
||||||
box->padAll(lv_dpx(8));
|
box->padAll(lv_dpx(8));
|
||||||
|
|
||||||
|
|||||||
@@ -192,6 +192,7 @@ class WindowButtonGroup : public FormGroup
|
|||||||
pages(pages)
|
pages(pages)
|
||||||
{
|
{
|
||||||
setFlexLayout(LV_FLEX_FLOW_ROW_WRAP, lv_dpx(8));
|
setFlexLayout(LV_FLEX_FLOW_ROW_WRAP, lv_dpx(8));
|
||||||
|
lv_obj_set_style_flex_main_place(lvobj, LV_FLEX_ALIGN_SPACE_EVENLY, 0);
|
||||||
padRow(lv_dpx(8));
|
padRow(lv_dpx(8));
|
||||||
|
|
||||||
for (auto& entry : pages) {
|
for (auto& entry : pages) {
|
||||||
|
|||||||
Reference in New Issue
Block a user