ExpansionPanel scroll issue

This commit is contained in:
Bertrand Songis
2020-04-16 13:00:50 +02:00
parent 3811f6f813
commit 98cf1f6c92
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ class ExpansionPanel: public FormGroup {
public:
ExpansionPanel(Window * parent, const rect_t & rect):
FormGroup(parent, rect, FORM_NO_BORDER | FORM_FORWARD_FOCUS)
FormGroup(parent, rect, FORM_NO_BORDER | FORM_FORWARD_FOCUS | FORWARD_SCROLL)
{
}
+3
View File
@@ -115,6 +115,7 @@ void FormGroup::setFocus(uint8_t flag)
if (first)
first->setFocus(SET_FOCUS_FIRST);
break;
case SET_FOCUS_BACKWARD:
// TODO this test should be recursive
if (focusWindow == first || focusWindow->getParent() == first) {
@@ -128,6 +129,7 @@ void FormGroup::setFocus(uint8_t flag)
last->setFocus(SET_FOCUS_BACKWARD);
}
break;
case SET_FOCUS_FORWARD:
// TODO this test should be recursive
if (focusWindow == last || focusWindow->getParent() == last || focusWindow->getParent()->getParent() == last) {
@@ -141,6 +143,7 @@ void FormGroup::setFocus(uint8_t flag)
first->setFocus(SET_FOCUS_FORWARD);
}
break;
default:
if (focusWindow == previous) {
if (first)