Cosmetics

This commit is contained in:
Bertrand Songis
2020-04-02 21:53:06 +02:00
parent b03bd80ecc
commit c686a94066
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -77,7 +77,7 @@ void MenuBody::paint(BitmapBuffer * dc)
auto & line = lines[i]; auto & line = lines[i];
LcdFlags flags = MENU_COLOR | MENU_FONT; LcdFlags flags = MENU_COLOR | MENU_FONT;
if (selectedIndex == i) { if (selectedIndex == i) {
flags = MENU_HIGHLIGHT_COLOR; flags = MENU_HIGHLIGHT_COLOR | MENU_FONT;
if (MENU_HIGHLIGHT_BGCOLOR != MENU_BGCOLOR) if (MENU_HIGHLIGHT_BGCOLOR != MENU_BGCOLOR)
dc->drawSolidFilledRect(0, i * MENUS_LINE_HEIGHT, width(), MENUS_LINE_HEIGHT, MENU_HIGHLIGHT_BGCOLOR); dc->drawSolidFilledRect(0, i * MENUS_LINE_HEIGHT, width(), MENUS_LINE_HEIGHT, MENU_HIGHLIGHT_BGCOLOR);
} }
+3 -3
View File
@@ -51,12 +51,12 @@ Window::~Window()
deleteChildren(); deleteChildren();
} }
void Window::attach(Window * window) void Window::attach(Window * newParent)
{ {
if (parent) if (parent)
detach(); detach();
parent = window; parent = newParent;
parent->addChild(this); newParent->addChild(this);
} }
void Window::detach() void Window::detach()
+2 -2
View File
@@ -323,6 +323,8 @@ class Window {
virtual void checkEvents(); virtual void checkEvents();
void attach(Window * window);
void detach(); void detach();
protected: protected:
@@ -345,8 +347,6 @@ class Window {
std::function<void()> closeHandler; std::function<void()> closeHandler;
std::function<void()> focusHandler; std::function<void()> focusHandler;
void attach(Window * window);
void addChild(Window * window, bool front = false) void addChild(Window * window, bool front = false)
{ {
if (front) if (front)