Migrate TactilityC and LVGL functionality (#588)
lvgl-module - Move and rename source and include files - Fix bug with missing lvgl unlock - New widgets: spinner, toolbar, sliderbox TactilityC - Removed tt_lock, tt_lvgl_\*
This commit is contained in:
committed by
GitHub
parent
cd2d9d6158
commit
b98a813f3c
@@ -4,7 +4,7 @@
|
||||
#include <Tactility/app/AppRegistration.h>
|
||||
#include <Tactility/file/File.h>
|
||||
#include <Tactility/lvgl/LvglSync.h>
|
||||
#include <Tactility/lvgl/Toolbar.h>
|
||||
#include <lvgl/widgets/toolbar.h>
|
||||
#include <Tactility/network/Http.h>
|
||||
#include <Tactility/Paths.h>
|
||||
#include <Tactility/service/loader/Loader.h>
|
||||
@@ -154,19 +154,19 @@ class AppHubDetailsApp final : public App {
|
||||
}
|
||||
|
||||
void updateViews() {
|
||||
lvgl::toolbar_clear_actions(toolbar);
|
||||
lvgl_toolbar_clear_actions(toolbar);
|
||||
const auto manifest = findAppManifestById(entry.appId);
|
||||
spinner = lvgl::toolbar_add_spinner_action(toolbar);
|
||||
spinner = lvgl_toolbar_add_spinner_action(toolbar);
|
||||
lv_obj_add_flag(spinner, LV_OBJ_FLAG_HIDDEN);
|
||||
lv_obj_add_flag(updateLabel, LV_OBJ_FLAG_HIDDEN);
|
||||
if (manifest != nullptr) {
|
||||
if (manifest->appVersionCode < entry.appVersionCode) {
|
||||
updateButton = lvgl::toolbar_add_image_button_action(toolbar, LV_SYMBOL_DOWNLOAD, onUpdatePressed, this);
|
||||
updateButton = lvgl_toolbar_add_image_button_action(toolbar, LV_SYMBOL_DOWNLOAD, onUpdatePressed, this);
|
||||
lv_obj_remove_flag(updateLabel, LV_OBJ_FLAG_HIDDEN);
|
||||
}
|
||||
lvgl::toolbar_add_image_button_action(toolbar, LV_SYMBOL_TRASH, onUninstallPressed, this);
|
||||
lvgl_toolbar_add_image_button_action(toolbar, LV_SYMBOL_TRASH, onUninstallPressed, this);
|
||||
} else {
|
||||
lvgl::toolbar_add_image_button_action(toolbar, LV_SYMBOL_DOWNLOAD, onInstallPressed, this);
|
||||
lvgl_toolbar_add_image_button_action(toolbar, LV_SYMBOL_DOWNLOAD, onInstallPressed, this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN);
|
||||
lv_obj_set_style_pad_row(parent, 0, LV_STATE_DEFAULT);
|
||||
|
||||
toolbar = lvgl::toolbar_create(parent, entry.appName.c_str());
|
||||
toolbar = lvgl_toolbar_create(parent, entry.appName.c_str());
|
||||
auto* wrapper = lv_obj_create(parent);
|
||||
lv_obj_set_width(wrapper, LV_PCT(100));
|
||||
lv_obj_set_flex_grow(wrapper, 1);
|
||||
|
||||
Reference in New Issue
Block a user