1. Included mroe fonts
2. change order of initialization. Lvgl has to be before ViewMain 3. Basic support for layers, but they are still broken when Menu's are used 4. Register input driver in lvglwrapper
This commit is contained in:
committed by
Raphael Coeffic
parent
fd3d6c902c
commit
fd276bb2fc
@@ -27,7 +27,6 @@ LvglWrapper* LvglWrapper::_instance = nullptr;
|
||||
|
||||
static lv_disp_drv_t disp_drv; /*A variable to hold the drivers. Must be static or global.*/
|
||||
lv_disp_t * disp;
|
||||
|
||||
static lv_disp_draw_buf_t disp_buf;
|
||||
static lv_indev_drv_t indev_drv;
|
||||
|
||||
@@ -268,14 +267,14 @@ LvglWrapper::LvglWrapper()
|
||||
disp_drv.sw_rotate = 1;
|
||||
|
||||
lv_indev_drv_init(&indev_drv); /*Basic initialization*/
|
||||
indev_drv.type =LV_INDEV_TYPE_POINTER; /*See below.*/
|
||||
indev_drv.type = LV_INDEV_TYPE_POINTER; /*See below.*/
|
||||
indev_drv.read_cb = my_input_read; /*See below.*/
|
||||
/*Register the driver in LVGL and save the created input device object*/
|
||||
|
||||
|
||||
disp = lv_disp_drv_register(&disp_drv); /*Register the driver and save the created display objects*/
|
||||
lv_example_canvas_2();
|
||||
|
||||
lv_indev_t * my_indev = lv_indev_drv_register(&indev_drv);
|
||||
|
||||
#if 0
|
||||
/*lv_indev_t * my_indev = */lv_indev_drv_register(&indev_drv);
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
FullScreenDialog::FullScreenDialog(
|
||||
uint8_t type, std::string title, std::string message, std::string action,
|
||||
const std::function<void(void)>& confirmHandler) :
|
||||
FormGroup(MainWindow::instance(), {0, 0, LCD_W, LCD_H}, OPAQUE),
|
||||
FormGroup(MainWindow::instance(), {0, 0, LCD_W, LCD_H}, OPAQUE, true),
|
||||
type(type),
|
||||
title(std::move(title)),
|
||||
message(std::move(message)),
|
||||
|
||||
@@ -45,7 +45,7 @@ void PageHeader::paint(BitmapBuffer * dc)
|
||||
}
|
||||
|
||||
Page::Page(unsigned icon):
|
||||
Window(MainWindow::instance(), {0, 0, LCD_W, LCD_H}, OPAQUE),
|
||||
Window(MainWindow::instance(), {0, 0, LCD_W, LCD_H}, OPAQUE, true),
|
||||
header(this, icon),
|
||||
body(this, { 0, MENU_HEADER_HEIGHT, LCD_W, LCD_H - MENU_HEADER_HEIGHT }, FORM_FORWARD_FOCUS)
|
||||
{
|
||||
|
||||
@@ -161,7 +161,7 @@ class SetupWidgetsPage: public FormWindow
|
||||
{
|
||||
public:
|
||||
SetupWidgetsPage(ScreenMenu* menu, uint8_t customScreenIdx):
|
||||
FormWindow(ViewMain::instance(), {0, 0, 0, 0}, FORM_FORWARD_FOCUS),
|
||||
FormWindow(ViewMain::instance(), {0, 0, 0, 0}, FORM_FORWARD_FOCUS,true),
|
||||
menu(menu),
|
||||
customScreenIdx(customScreenIdx)
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ Topbar * TopbarFactory::create(Window * parent)
|
||||
}
|
||||
|
||||
SetupTopBarWidgetsPage::SetupTopBarWidgetsPage(ScreenMenu* menu):
|
||||
FormWindow(ViewMain::instance(), {0, 0, 0, 0}, FORM_FORWARD_FOCUS),
|
||||
FormWindow(ViewMain::instance(), {0, 0, 0, 0}, FORM_FORWARD_FOCUS, true),
|
||||
menu(menu)
|
||||
{
|
||||
// remember focus
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "view_text.h"
|
||||
|
||||
ViewMainMenu::ViewMainMenu(Window* parent) :
|
||||
Window(parent->getFullScreenWindow(), {})
|
||||
Window(parent->getFullScreenWindow(), {}, 0, 0, true)
|
||||
{
|
||||
// Save focus
|
||||
Layer::push(this);
|
||||
|
||||
Reference in New Issue
Block a user