Cosmetics

This commit is contained in:
Bertrand Songis
2020-03-16 08:27:09 +01:00
parent 86e24f417a
commit b121895171
3 changed files with 9 additions and 4 deletions
+1 -1
View File
@@ -130,7 +130,7 @@ void FormGroup::setFocus(uint8_t flag)
break;
case SET_FOCUS_FORWARD:
// TODO this test should be recursive
if (focusWindow == last || focusWindow->getParent() == last) {
if (focusWindow == last || focusWindow->getParent() == last || focusWindow->getParent()->getParent() == last) {
if (next == this)
first->setFocus(SET_FOCUS_FORWARD);
else if (next)
+6 -1
View File
@@ -85,9 +85,14 @@ class StaticBitmap: public Window {
}
void setBitmap(const char * filename)
{
setBitmap(BitmapBuffer::loadBitmap(filename));
}
void setBitmap(const BitmapBuffer * newBitmap)
{
delete bitmap;
bitmap = BitmapBuffer::loadBitmap(filename);
bitmap = newBitmap;
invalidate();
}
+2 -2
View File
@@ -407,12 +407,12 @@ coord_t Window::adjustHeight()
void Window::moveWindowsTop(coord_t y, coord_t delta)
{
for (auto child: children) {
if (child->rect.y > y) {
if (child->rect.y >= y) {
child->rect.y += delta;
invalidate();
}
}
innerHeight += delta;
setInnerHeight(innerHeight + delta);
}
void Window::invalidate(const rect_t & rect)