Cosmetics
This commit is contained in:
+1
-1
@@ -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
@@ -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
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user