Simplified toolbar creation (#83)

This commit is contained in:
Ken Van Hoeylandt
2024-11-22 23:47:18 +01:00
committed by GitHub
parent a4593c6248
commit 881c8517bf
15 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ lv_obj_t* toolbar_create(lv_obj_t* parent, const std::string& title) {
return obj;
}
lv_obj_t* toolbar_create_for_app(lv_obj_t* parent, App app) {
lv_obj_t* toolbar_create(lv_obj_t* parent, App app) {
const AppManifest& manifest = tt_app_get_manifest(app);
lv_obj_t* toolbar = toolbar_create(parent, manifest.name);
toolbar_set_nav_action(toolbar, LV_SYMBOL_CLOSE, &stop_app, nullptr);
+1 -1
View File
@@ -19,7 +19,7 @@ typedef struct {
} ToolbarAction;
lv_obj_t* toolbar_create(lv_obj_t* parent, const std::string& title);
lv_obj_t* toolbar_create_for_app(lv_obj_t* parent, tt::App app);
lv_obj_t* toolbar_create(lv_obj_t* parent, tt::App app);
void toolbar_set_title(lv_obj_t* obj, const std::string& title);
void toolbar_set_nav_action(lv_obj_t* obj, const char* icon, lv_event_cb_t callback, void* user_data);
uint8_t toolbar_add_action(lv_obj_t* obj, const char* icon, const char* text, lv_event_cb_t callback, void* user_data);