Forms refactoring
This commit is contained in:
+1
-1
@@ -50,7 +50,7 @@ bool Button::onTouchEnd(coord_t x, coord_t y)
|
||||
{
|
||||
if (enabled()) {
|
||||
onPress();
|
||||
if (!(flags & BUTTON_NOFOCUS)) {
|
||||
if (!(windowFlags & BUTTON_NOFOCUS)) {
|
||||
setFocus();
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -30,6 +30,7 @@ FormField::FormField(Window *parent, const rect_t & rect, WindowFlags windowFlag
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(HARDWARE_KEYS)
|
||||
void FormField::onEvent(event_t event)
|
||||
{
|
||||
TRACE_WINDOWS("%s received event 0x%X", FormField::getWindowDebugString().c_str(), event);
|
||||
@@ -56,6 +57,7 @@ void FormField::onEvent(event_t event)
|
||||
Window::onEvent(event);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void FormField::paint(BitmapBuffer * dc)
|
||||
{
|
||||
|
||||
+2
-2
@@ -23,10 +23,10 @@
|
||||
#include "mainwindow.h"
|
||||
#include "form.h"
|
||||
|
||||
class Keyboard: public Window {
|
||||
class Keyboard: public FormWindow {
|
||||
public:
|
||||
explicit Keyboard(coord_t height):
|
||||
Window(nullptr, {0, LCD_H - height, LCD_W, height}, OPAQUE)
|
||||
FormWindow(nullptr, {0, LCD_H - height, LCD_W, height}, OPAQUE)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user