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
|
||||
form = new FormGroup(window, rect_t{});
|
||||
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 TimerWindow(0); });
|
||||
new SubScreenButton(form, TR_TIMER "2",
|
||||
@@ -274,7 +275,8 @@ void ModelSetupPage::build(FormWindow * window)
|
||||
|
||||
form = new FormGroup(window, rect_t{});
|
||||
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 PreflightChecks(); });
|
||||
|
||||
@@ -248,9 +248,10 @@ void RadioHardwarePage::build(FormWindow * window)
|
||||
|
||||
box = new FormGroup(window, rect_t{});
|
||||
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->padAll(lv_dpx(8));
|
||||
|
||||
|
||||
auto calib = new TextButton(box, rect_t{}, STR_CALIBRATION);
|
||||
calib->setPressHandler([=]() -> uint8_t {
|
||||
new RadioCalibrationPage();
|
||||
@@ -281,6 +282,7 @@ void RadioHardwarePage::build(FormWindow * window)
|
||||
|
||||
box = new FormGroup(window, rect_t{});
|
||||
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->padAll(lv_dpx(8));
|
||||
|
||||
|
||||
@@ -192,6 +192,7 @@ class WindowButtonGroup : public FormGroup
|
||||
pages(pages)
|
||||
{
|
||||
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));
|
||||
|
||||
for (auto& entry : pages) {
|
||||
|
||||
Reference in New Issue
Block a user