fix: model setup jumping focus issues
This commit is contained in:
committed by
Raphael Coeffic
parent
0d7e262358
commit
be1312f6c9
@@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
ModuleWindow::ModuleWindow(FormWindow *parent, const rect_t &rect,
|
ModuleWindow::ModuleWindow(FormWindow *parent, const rect_t &rect,
|
||||||
uint8_t moduleIdx) :
|
uint8_t moduleIdx) :
|
||||||
FormGroup(parent, rect, FORWARD_SCROLL | FORM_FORWARD_FOCUS),
|
FormGroup(parent, rect, FORWARD_SCROLL | NO_FOCUS | FORM_FORWARD_FOCUS),
|
||||||
moduleIdx(moduleIdx)
|
moduleIdx(moduleIdx)
|
||||||
{
|
{
|
||||||
update();
|
update();
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ bool TabsCarousel::onTouchSlide(coord_t x, coord_t y, coord_t startX, coord_t st
|
|||||||
TabsGroup::TabsGroup(uint8_t icon):
|
TabsGroup::TabsGroup(uint8_t icon):
|
||||||
Window(MainWindow::instance(), { 0, 0, LCD_W, LCD_H }, OPAQUE),
|
Window(MainWindow::instance(), { 0, 0, LCD_W, LCD_H }, OPAQUE),
|
||||||
header(this, icon),
|
header(this, icon),
|
||||||
body(this, { 0, MENU_BODY_TOP, LCD_W, MENU_BODY_HEIGHT }, FORM_FORWARD_FOCUS)
|
body(this, { 0, MENU_BODY_TOP, LCD_W, MENU_BODY_HEIGHT }, NO_FOCUS | FORM_FORWARD_FOCUS)
|
||||||
{
|
{
|
||||||
Layer::push(this);
|
Layer::push(this);
|
||||||
}
|
}
|
||||||
@@ -196,7 +196,7 @@ void TabsGroup::setVisibleTab(PageTab* tab)
|
|||||||
if (tab->onSetVisible) tab->onSetVisible();
|
if (tab->onSetVisible) tab->onSetVisible();
|
||||||
|
|
||||||
auto form = new FormWindow(&body, rect_t{0, 0, body.width(), body.height()},
|
auto form = new FormWindow(&body, rect_t{0, 0, body.width(), body.height()},
|
||||||
FORM_FORWARD_FOCUS);
|
NO_FOCUS | FORM_FORWARD_FOCUS);
|
||||||
tab->build(form);
|
tab->build(form);
|
||||||
form->setFocus();
|
form->setFocus();
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class TrChoice : public Choice
|
|||||||
|
|
||||||
TrainerModuleWindow::TrainerModuleWindow(FormWindow *parent,
|
TrainerModuleWindow::TrainerModuleWindow(FormWindow *parent,
|
||||||
const rect_t &rect) :
|
const rect_t &rect) :
|
||||||
FormGroup(parent, rect, FORWARD_SCROLL | FORM_FORWARD_FOCUS)
|
FormGroup(parent, rect, FORWARD_SCROLL | NO_FOCUS | FORM_FORWARD_FOCUS)
|
||||||
{
|
{
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user