App improvements (#103)

This commit is contained in:
Ken Van Hoeylandt
2024-12-03 23:13:59 +01:00
committed by GitHub
parent c7314546fe
commit f31c7f00ae
23 changed files with 246 additions and 229 deletions
+2 -2
View File
@@ -42,7 +42,7 @@ UI is created with [lvgl](https://github.com/lvgl/lvgl) which has lots of [widge
Creating a touch-capable UI is [easy](https://docs.lvgl.io/9.0/get-started/quick-overview.html) and doesn't require your own render loop!
```C++
static void app_show(tt::app::App app, lv_obj_t* parent) {
static void onShow(tt::app::App app, lv_obj_t* parent) {
// Default toolbar with app name and close button
lv_obj_t* toolbar = tt::lvgl::toolbar_create(parent, app);
lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0);
@@ -57,7 +57,7 @@ static void app_show(tt::app::App app, lv_obj_t* parent) {
extern const tt::app::Manifest manifest = {
.id = "HelloWorld", // Used to identify and start an app
.name = "Hello World", // Shown on the desktop and app's toolbar
.onShow = &app_show // A minimal setup sets the on_show() function
.onShow = onShow // A minimal setup sets the onShow() function
};
```