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,9 +4,9 @@
|
||||
#include <Tactility/lvgl/Style.h>
|
||||
#include <Tactility/lvgl/Toolbar.h>
|
||||
|
||||
#include <lvgl/icons/shared.h>
|
||||
#include <tactility/drivers/uart_controller.h>
|
||||
#include <tactility/log.h>
|
||||
#include <lvgl/lvgl_icon_shared.h>
|
||||
|
||||
#include <gps/gps.h>
|
||||
#include <gps/gps_settings.h>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "Tactility/app/alertdialog/AlertDialog.h"
|
||||
|
||||
#include "Tactility/lvgl/Toolbar.h"
|
||||
#include <lvgl/widgets/toolbar.h>
|
||||
#include "Tactility/service/loader/Loader.h"
|
||||
|
||||
#include <Tactility/StringUtils.h>
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
check(parameters != nullptr, "Parameters missing");
|
||||
|
||||
std::string title = getTitleParameter(app.getParameters());
|
||||
lv_obj_t* toolbar = lvgl::toolbar_create(parent, title);
|
||||
lv_obj_t* toolbar = lvgl_toolbar_create(parent, title.c_str());
|
||||
lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0);
|
||||
|
||||
lv_obj_t* message_label = lv_label_create(parent);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <Tactility/app/alertdialog/AlertDialog.h>
|
||||
#include <tactility/check.h>
|
||||
#include <Tactility/lvgl/Style.h>
|
||||
#include <Tactility/lvgl/Toolbar.h>
|
||||
#include <lvgl/widgets/toolbar.h>
|
||||
|
||||
#include <lvgl.h>
|
||||
#include <format>
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
lv_obj_set_style_pad_row(parent, 0, LV_STATE_DEFAULT);
|
||||
|
||||
auto title = std::format("{} details", manifest->appName);
|
||||
lvgl::toolbar_create(parent, title);
|
||||
lvgl_toolbar_create(parent, title.c_str());
|
||||
|
||||
auto* wrapper = lv_obj_create(parent);
|
||||
lv_obj_set_width(wrapper, LV_PCT(100));
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
#include <Tactility/app/apphubdetails/AppHubDetailsApp.h>
|
||||
#include <Tactility/file/File.h>
|
||||
#include <Tactility/lvgl/LvglSync.h>
|
||||
#include <Tactility/lvgl/Spinner.h>
|
||||
#include <lvgl/widgets/spinner.h>
|
||||
#include <Tactility/lvgl/Toolbar.h>
|
||||
#include <Tactility/network/Http.h>
|
||||
#include <Tactility/Paths.h>
|
||||
#include <Tactility/service/loader/Loader.h>
|
||||
#include <Tactility/service/wifi/Wifi.h>
|
||||
|
||||
#include <lvgl.h>
|
||||
#include <tactility/log.h>
|
||||
#include <lvgl/lvgl_icon_shared.h>
|
||||
#include <lvgl/icons/shared.h>
|
||||
#include <algorithm>
|
||||
#include <format>
|
||||
#include <lvgl.h>
|
||||
#include <tactility/log.h>
|
||||
|
||||
namespace tt::app::apphub {
|
||||
|
||||
@@ -125,7 +125,7 @@ class AppHubApp final : public App {
|
||||
|
||||
void refresh() {
|
||||
lv_obj_clean(contentWrapper);
|
||||
auto* spinner = lvgl::spinner_create(contentWrapper);
|
||||
auto* spinner = lvgl_spinner_create(contentWrapper);
|
||||
lv_obj_align(spinner, LV_ALIGN_CENTER, 0, 0);
|
||||
|
||||
lv_obj_add_flag(refreshButton, LV_OBJ_FLAG_HIDDEN);
|
||||
@@ -165,7 +165,7 @@ public:
|
||||
lv_obj_set_style_pad_row(parent, 0, LV_STATE_DEFAULT);
|
||||
|
||||
auto* toolbar = lvgl::toolbar_create(parent, app);
|
||||
refreshButton = lvgl::toolbar_add_image_button_action(toolbar, LV_SYMBOL_REFRESH, onRefreshPressed, this);
|
||||
refreshButton = lvgl_toolbar_add_image_button_action(toolbar, LV_SYMBOL_REFRESH, onRefreshPressed, this);
|
||||
lv_obj_add_flag(refreshButton, LV_OBJ_FLAG_HIDDEN);
|
||||
|
||||
contentWrapper = lv_obj_create(parent);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
#include <lvgl.h>
|
||||
#include <algorithm>
|
||||
|
||||
#include <lvgl/lvgl_fonts.h>
|
||||
#include <lvgl/lvgl_icon_shared.h>
|
||||
#include <lvgl/icons/shared.h>
|
||||
#include <lvgl/fonts.h>
|
||||
|
||||
namespace tt::app::applist {
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#include <lvgl/lvgl_fonts.h>
|
||||
#include <lvgl/lvgl_icon_shared.h>
|
||||
#include <lvgl/icons/shared.h>
|
||||
#include <lvgl/fonts.h>
|
||||
|
||||
#include <Tactility/app/AppRegistration.h>
|
||||
#include <Tactility/app/appdetails/AppDetails.h>
|
||||
#include <Tactility/lvgl/Toolbar.h>
|
||||
#include <Tactility/service/loader/Loader.h>
|
||||
#include <lvgl/widgets/toolbar.h>
|
||||
|
||||
#include <lvgl.h>
|
||||
#include <algorithm>
|
||||
@@ -29,7 +29,7 @@ class AppSettingsApp final : public App {
|
||||
public:
|
||||
|
||||
void onShow(AppContext& app, lv_obj_t* parent) override {
|
||||
auto* toolbar = lvgl::toolbar_create(parent, "Installed Apps");
|
||||
auto* toolbar = lvgl_toolbar_create(parent, "Installed Apps");
|
||||
lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0);
|
||||
|
||||
lv_obj_t* list = lv_list_create(parent);
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#include <Tactility/Tactility.h>
|
||||
|
||||
#include <lvgl/lvgl_icon_shared.h>
|
||||
#include <lvgl/icons/shared.h>
|
||||
|
||||
#include <Tactility/PubSub.h>
|
||||
#include <Tactility/app/App.h>
|
||||
#include <Tactility/lvgl/LvglSync.h>
|
||||
#include <Tactility/lvgl/SliderBox.h>
|
||||
#include <Tactility/lvgl/Toolbar.h>
|
||||
#include <Tactility/service/audio/Audio.h>
|
||||
#include <lvgl/widgets/sliderbox.h>
|
||||
|
||||
#include <lvgl.h>
|
||||
#include <lvgl/lvgl.h>
|
||||
@@ -52,13 +52,13 @@ class AudioSettingsApp final : public App {
|
||||
|
||||
static void onInputVolumeSlider(lv_event_t* event) {
|
||||
auto* sliderBox = static_cast<lv_obj_t*>(lv_event_get_target(event));
|
||||
float percent = static_cast<float>(lvgl::sliderbox_get_value(sliderBox));
|
||||
float percent = static_cast<float>(lvgl_sliderbox_get_value(sliderBox));
|
||||
service::audio::setInputVolume(percent);
|
||||
}
|
||||
|
||||
static void onOutputVolumeSlider(lv_event_t* event) {
|
||||
auto* sliderBox = static_cast<lv_obj_t*>(lv_event_get_target(event));
|
||||
float percent = static_cast<float>(lvgl::sliderbox_get_value(sliderBox));
|
||||
float percent = static_cast<float>(lvgl_sliderbox_get_value(sliderBox));
|
||||
service::audio::setOutputVolume(percent);
|
||||
}
|
||||
|
||||
@@ -102,10 +102,10 @@ class AudioSettingsApp final : public App {
|
||||
lv_label_set_text(row_label, label);
|
||||
lv_obj_align(row_label, LV_ALIGN_LEFT_MID, 0, 0);
|
||||
|
||||
auto* sliderBox = lvgl::sliderbox_create(row, 0, 100, 10, initialValue);
|
||||
auto* sliderBox = lvgl_sliderbox_create(row, 0, 100, 10, initialValue);
|
||||
lv_obj_set_width(sliderBox, LV_PCT(50));
|
||||
lv_obj_align(sliderBox, LV_ALIGN_RIGHT_MID, 0, 0);
|
||||
lvgl::sliderbox_add_value_changed_cb(sliderBox, cb, userData);
|
||||
lvgl_sliderbox_add_value_changed_cb(sliderBox, cb, userData);
|
||||
|
||||
return sliderBox;
|
||||
}
|
||||
@@ -192,7 +192,7 @@ public:
|
||||
else lv_obj_remove_state(inputMuteSwitch, LV_STATE_CHECKED);
|
||||
}
|
||||
if (inputVolumeSlider) {
|
||||
lvgl::sliderbox_set_value(inputVolumeSlider, static_cast<int32_t>(service::audio::getInputVolume()), LV_ANIM_OFF);
|
||||
lvgl_sliderbox_set_value(inputVolumeSlider, static_cast<int32_t>(service::audio::getInputVolume()), LV_ANIM_OFF);
|
||||
}
|
||||
|
||||
if (outputEnabledSwitch) {
|
||||
@@ -204,7 +204,7 @@ public:
|
||||
else lv_obj_remove_state(outputMuteSwitch, LV_STATE_CHECKED);
|
||||
}
|
||||
if (outputVolumeSlider) {
|
||||
lvgl::sliderbox_set_value(outputVolumeSlider, static_cast<int32_t>(service::audio::getOutputVolume()), LV_ANIM_OFF);
|
||||
lvgl_sliderbox_set_value(outputVolumeSlider, static_cast<int32_t>(service::audio::getOutputVolume()), LV_ANIM_OFF);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
#include <Tactility/app/AppManifest.h>
|
||||
#include <Tactility/lvgl/LvglSync.h>
|
||||
|
||||
#include <lvgl/icons/shared.h>
|
||||
#include <tactility/log.h>
|
||||
#include <lvgl/lvgl_icon_shared.h>
|
||||
|
||||
namespace tt::app::btmanage {
|
||||
|
||||
|
||||
@@ -222,9 +222,9 @@ void View::init(const AppContext& app, lv_obj_t* parent) {
|
||||
// Toolbar
|
||||
auto* toolbar = lvgl::toolbar_create(parent, app);
|
||||
|
||||
scanning_spinner = lvgl::toolbar_add_spinner_action(toolbar);
|
||||
scanning_spinner = lvgl_toolbar_add_spinner_action(toolbar);
|
||||
|
||||
enable_switch = lvgl::toolbar_add_switch_action(toolbar);
|
||||
enable_switch = lvgl_toolbar_add_switch_action(toolbar);
|
||||
lv_obj_add_event_cb(enable_switch, onEnableSwitchChanged, LV_EVENT_VALUE_CHANGED, nullptr);
|
||||
|
||||
// Peer list
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <Tactility/bluetooth/BluetoothPairedDevice.h>
|
||||
#include <Tactility/lvgl/LvglSync.h>
|
||||
#include <Tactility/lvgl/Style.h>
|
||||
#include <Tactility/lvgl/Toolbar.h>
|
||||
#include <lvgl/widgets/toolbar.h>
|
||||
#include <tactility/check.h>
|
||||
#include <tactility/drivers/bluetooth.h>
|
||||
#include <tactility/log.h>
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN);
|
||||
lv_obj_set_style_pad_row(parent, 0, LV_STATE_DEFAULT);
|
||||
|
||||
lvgl::toolbar_create(parent, title);
|
||||
lvgl_toolbar_create(parent, title.c_str());
|
||||
|
||||
auto* wrapper = lv_obj_create(parent);
|
||||
lv_obj_set_width(wrapper, LV_PCT(100));
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
#include <Tactility/app/AppManifest.h>
|
||||
#include <Tactility/lvgl/LvglSync.h>
|
||||
|
||||
#include <lvgl/icons/shared.h>
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
#include <cstdlib>
|
||||
#include <tactility/log.h>
|
||||
#include <lvgl/lvgl_icon_shared.h>
|
||||
#include <vector>
|
||||
|
||||
namespace tt::app::chat {
|
||||
|
||||
@@ -34,7 +34,7 @@ void ChatView::updateToolbarTitle() {
|
||||
if (!state || !toolbar) return;
|
||||
std::string channel = state->getCurrentChannel();
|
||||
std::string title = "Chat: " + channel;
|
||||
lvgl::toolbar_set_title(toolbar, title);
|
||||
lvgl_toolbar_set_title(toolbar, title.c_str());
|
||||
}
|
||||
|
||||
void ChatView::createInputBar(lv_obj_t* parent) {
|
||||
@@ -149,8 +149,8 @@ void ChatView::init(AppContext& appContext, lv_obj_t* parent) {
|
||||
lv_obj_set_style_pad_row(parent, 0, LV_STATE_DEFAULT);
|
||||
|
||||
toolbar = lvgl::toolbar_create(parent, appContext);
|
||||
lvgl::toolbar_add_text_button_action(toolbar, LV_SYMBOL_LIST, onChannelClicked, this);
|
||||
lvgl::toolbar_add_text_button_action(toolbar, LV_SYMBOL_SETTINGS, onSettingsClicked, this);
|
||||
lvgl_toolbar_add_text_button_action(toolbar, LV_SYMBOL_LIST, onChannelClicked, this);
|
||||
lvgl_toolbar_add_text_button_action(toolbar, LV_SYMBOL_SETTINGS, onSettingsClicked, this);
|
||||
updateToolbarTitle();
|
||||
|
||||
// Message list
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
#include <Tactility/service/loader/Loader.h>
|
||||
#include <Tactility/service/wifi/Wifi.h>
|
||||
|
||||
#include <tactility/log.h>
|
||||
#include <lvgl/lvgl_icon_shared.h>
|
||||
#include <lvgl/icons/shared.h>
|
||||
#include <lvgl/lvgl.h>
|
||||
#include <tactility/log.h>
|
||||
|
||||
#include <cstring>
|
||||
#include <lvgl.h>
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
|
||||
lv_obj_t* toolbar = lvgl::toolbar_create(parent, app);
|
||||
|
||||
enableSwitch = lvgl::toolbar_add_switch_action(toolbar);
|
||||
enableSwitch = lvgl_toolbar_add_switch_action(toolbar);
|
||||
lv_obj_add_event_cb(enableSwitch, onEnableSwitchChanged, LV_EVENT_VALUE_CHANGED, this);
|
||||
|
||||
if (service->isEnabled()) {
|
||||
|
||||
@@ -523,10 +523,10 @@ void View::init(const AppContext& appContext, lv_obj_t* parent) {
|
||||
lv_obj_set_style_pad_row(parent, 0, LV_STATE_DEFAULT);
|
||||
|
||||
auto* toolbar = lvgl::toolbar_create(parent, appContext);
|
||||
navigate_up_button = lvgl::toolbar_add_image_button_action(toolbar, LV_SYMBOL_UP, &onNavigateUpPressedCallback, this);
|
||||
new_file_button = lvgl::toolbar_add_image_button_action(toolbar, LV_SYMBOL_FILE, &onNewFilePressedCallback, this);
|
||||
new_folder_button = lvgl::toolbar_add_image_button_action(toolbar, LV_SYMBOL_DIRECTORY, &onNewFolderPressedCallback, this);
|
||||
paste_button = lvgl::toolbar_add_image_button_action(toolbar, LV_SYMBOL_PASTE, &onPastePressedCallback, this);
|
||||
navigate_up_button = lvgl_toolbar_add_image_button_action(toolbar, LV_SYMBOL_UP, &onNavigateUpPressedCallback, this);
|
||||
new_file_button = lvgl_toolbar_add_image_button_action(toolbar, LV_SYMBOL_FILE, &onNewFilePressedCallback, this);
|
||||
new_folder_button = lvgl_toolbar_add_image_button_action(toolbar, LV_SYMBOL_DIRECTORY, &onNewFolderPressedCallback, this);
|
||||
paste_button = lvgl_toolbar_add_image_button_action(toolbar, LV_SYMBOL_PASTE, &onPastePressedCallback, this);
|
||||
lv_obj_add_flag(lv_obj_get_parent(paste_button), LV_OBJ_FLAG_HIDDEN);
|
||||
|
||||
auto* wrapper = lv_obj_create(parent);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <Tactility/file/File.h>
|
||||
#include <Tactility/Platform.h>
|
||||
#include <Tactility/lvgl/LvglSync.h>
|
||||
#include <Tactility/lvgl/Toolbar.h>
|
||||
#include <lvgl/widgets/toolbar.h>
|
||||
#include <tactility/check.h>
|
||||
#include <tactility/log.h>
|
||||
|
||||
@@ -181,8 +181,8 @@ void View::init(lv_obj_t* parent, Mode mode) {
|
||||
lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN);
|
||||
lv_obj_set_style_pad_row(parent, 0, LV_STATE_DEFAULT);
|
||||
|
||||
auto* toolbar = lvgl::toolbar_create(parent, "Select File");
|
||||
navigate_up_button = lvgl::toolbar_add_image_button_action(toolbar, LV_SYMBOL_UP, &onNavigateUpPressedCallback, this);
|
||||
auto* toolbar = lvgl_toolbar_create(parent, "Select File");
|
||||
navigate_up_button = lvgl_toolbar_add_image_button_action(toolbar, LV_SYMBOL_UP, &onNavigateUpPressedCallback, this);
|
||||
|
||||
auto* wrapper = lv_obj_create(parent);
|
||||
lv_obj_set_width(wrapper, LV_PCT(100));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <lvgl/icons/shared.h>
|
||||
#include <lvgl/lvgl.h>
|
||||
#include <lvgl/lvgl_icon_shared.h>
|
||||
|
||||
#include <Tactility/Tactility.h>
|
||||
#include <Tactility/Timer.h>
|
||||
@@ -223,7 +223,7 @@ public:
|
||||
uint8_t margin = (lvgl_get_ui_density() == LVGL_UI_DENSITY_COMPACT) ? 2 : 8;
|
||||
|
||||
auto* toolbar = lvgl::toolbar_create(parent, app);
|
||||
lvgl::toolbar_add_text_button_action(toolbar, LV_SYMBOL_PLUS, onAddGpsCallback, this);
|
||||
lvgl_toolbar_add_text_button_action(toolbar, LV_SYMBOL_PLUS, onAddGpsCallback, this);
|
||||
lv_obj_set_style_margin_bottom(toolbar, margin, LV_STATE_DEFAULT);
|
||||
|
||||
deviceListWrapper = lv_obj_create(parent);
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#include <lvgl/icons/shared.h>
|
||||
#include <tactility/device.h>
|
||||
#include <tactility/drivers/grove.h>
|
||||
#include <lvgl/lvgl_icon_shared.h>
|
||||
|
||||
#include <Tactility/Tactility.h>
|
||||
#include <Tactility/lvgl/Toolbar.h>
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
|
||||
#include <format>
|
||||
|
||||
#include <lvgl/icons/shared.h>
|
||||
#include <tactility/log.h>
|
||||
#include <lvgl/lvgl_icon_shared.h>
|
||||
|
||||
namespace tt::app::i2cscanner {
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <Tactility/app/inputdialog/InputDialog.h>
|
||||
|
||||
#include <Tactility/lvgl/Toolbar.h>
|
||||
#include <lvgl/widgets/toolbar.h>
|
||||
#include <Tactility/service/loader/Loader.h>
|
||||
#include <Tactility/TactilityCore.h>
|
||||
#include <tactility/log.h>
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
check(parameters != nullptr, "Parameters missing");
|
||||
|
||||
std::string title = getTitleParameter(app.getParameters());
|
||||
auto* toolbar = lvgl::toolbar_create(parent, title);
|
||||
auto* toolbar = lvgl_toolbar_create(parent, title.c_str());
|
||||
lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0);
|
||||
|
||||
auto* message_label = lv_label_create(parent);
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#include <tactility/drivers/display.h>
|
||||
#include <tactility/error.h>
|
||||
#include <lvgl/lvgl_icon_shared.h>
|
||||
#include <lvgl/icons/shared.h>
|
||||
#include <lvgl/lvgl.h>
|
||||
#include <tactility/device.h>
|
||||
#include <tactility/drivers/backlight.h>
|
||||
#include <tactility/drivers/display.h>
|
||||
#include <tactility/error.h>
|
||||
#include <tactility/log.h>
|
||||
#include <lvgl/lvgl.h>
|
||||
|
||||
#include <Tactility/Tactility.h>
|
||||
#ifdef ESP_PLATFORM
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
#include <Tactility/settings/KeyboardSettings.h>
|
||||
#include <Tactility/lvgl/Toolbar.h>
|
||||
|
||||
#include <lvgl/icons/shared.h>
|
||||
#include <tactility/device.h>
|
||||
#include <tactility/drivers/backlight.h>
|
||||
#include <lvgl/lvgl_icon_shared.h>
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
#include <cstring>
|
||||
#include <lvgl.h>
|
||||
|
||||
#include <lvgl/icons/launcher.h>
|
||||
#include <lvgl/fonts.h>
|
||||
#include <lvgl/lvgl.h>
|
||||
#include <tactility/device.h>
|
||||
#include <tactility/drivers/power_supply.h>
|
||||
#include <tactility/log.h>
|
||||
#include <lvgl/lvgl_fonts.h>
|
||||
#include <lvgl/lvgl_icon_launcher.h>
|
||||
#include <lvgl/lvgl.h>
|
||||
|
||||
namespace tt::app::launcher {
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <Tactility/settings/Language.h>
|
||||
#include <Tactility/settings/SystemSettings.h>
|
||||
|
||||
#include <lvgl/lvgl_icon_shared.h>
|
||||
#include <lvgl/icons/shared.h>
|
||||
|
||||
#include <lvgl.h>
|
||||
#include <map>
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
|
||||
#include <Tactility/file/File.h>
|
||||
|
||||
#include <lvgl/icons/shared.h>
|
||||
#include <lvgl.h>
|
||||
#include <tactility/log.h>
|
||||
#include <lvgl/lvgl_icon_shared.h>
|
||||
|
||||
namespace tt::app::notes {
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
|
||||
#include <Tactility/Timer.h>
|
||||
|
||||
#include <lvgl/icons/shared.h>
|
||||
#include <tactility/device.h>
|
||||
#include <tactility/drivers/power_supply.h>
|
||||
#include <lvgl/lvgl_icon_shared.h>
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
#include <Tactility/app/AppRegistration.h>
|
||||
#include <Tactility/service/loader/Loader.h>
|
||||
|
||||
#include <lvgl/icons/shared.h>
|
||||
#include <lvgl.h>
|
||||
#include <lvgl/fonts.h>
|
||||
#include <tactility/device.h>
|
||||
#include <tactility/drivers/power_supply.h>
|
||||
#include <lvgl/lvgl_fonts.h>
|
||||
#include <lvgl/lvgl_icon_shared.h>
|
||||
|
||||
namespace tt::app::poweroff {
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
#include <Tactility/Paths.h>
|
||||
#include <Tactility/Timer.h>
|
||||
|
||||
#include <lvgl/icons/shared.h>
|
||||
#include <tactility/log.h>
|
||||
#include <lvgl/lvgl_icon_shared.h>
|
||||
|
||||
namespace tt::app::screenshot {
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <Tactility/app/selectiondialog/SelectionDialog.h>
|
||||
|
||||
#include <Tactility/lvgl/Toolbar.h>
|
||||
#include <lvgl/widgets/toolbar.h>
|
||||
#include <Tactility/service/loader/Loader.h>
|
||||
#include <Tactility/StringUtils.h>
|
||||
#include <tactility/log.h>
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
lv_obj_set_style_pad_row(parent, 0, LV_STATE_DEFAULT);
|
||||
|
||||
std::string title = getTitleParameter(app.getParameters());
|
||||
lvgl::toolbar_create(parent, title);
|
||||
lvgl_toolbar_create(parent, title.c_str());
|
||||
|
||||
auto* list = lv_list_create(parent);
|
||||
lv_obj_set_width(list, LV_PCT(100));
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
#include <Tactility/lvgl/Toolbar.h>
|
||||
#include <Tactility/service/loader/Loader.h>
|
||||
|
||||
#include <lvgl/icons/shared.h>
|
||||
#include <lvgl/fonts.h>
|
||||
#include <tactility/check.h>
|
||||
#include <lvgl/lvgl_icon_shared.h>
|
||||
#include <lvgl/lvgl_fonts.h>
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <lvgl/lvgl_fonts.h>
|
||||
#include <lvgl/fonts.h>
|
||||
#include <lvgl/lvgl.h>
|
||||
|
||||
#include <Tactility/app/App.h>
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
#include <lvgl.h>
|
||||
#include <utility>
|
||||
|
||||
#include <lvgl/lvgl_fonts.h>
|
||||
#include <lvgl/lvgl_icon_shared.h>
|
||||
#include <lvgl/icons/shared.h>
|
||||
#include <lvgl/fonts.h>
|
||||
#include <lvgl/lvgl.h>
|
||||
|
||||
#ifdef ESP_PLATFORM
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#include <lvgl/icons/shared.h>
|
||||
#include <tactility/log.h>
|
||||
#include <lvgl/lvgl_icon_shared.h>
|
||||
|
||||
namespace tt::app::timedatesettings {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <lvgl/lvgl_fonts.h>
|
||||
#include <lvgl/lvgl_icon_shared.h>
|
||||
#include <lvgl/icons/shared.h>
|
||||
#include <lvgl/fonts.h>
|
||||
|
||||
#include <Tactility/app/AppContext.h>
|
||||
#include <Tactility/app/AppManifest.h>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include <tactility/log.h>
|
||||
#include <lvgl/lvgl.h>
|
||||
#include <lvgl/lvgl_pointer.h>
|
||||
#include <lvgl/devices/pointer.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <lvgl.h>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#include <lvgl/lvgl_icon_shared.h>
|
||||
#include <lvgl/icons/shared.h>
|
||||
#include <lvgl/lvgl.h>
|
||||
|
||||
#include <Tactility/Tactility.h>
|
||||
@@ -117,7 +117,7 @@ public:
|
||||
|
||||
lv_obj_t* toolbar = lvgl::toolbar_create(parent, app);
|
||||
|
||||
switchTrackball = lvgl::toolbar_add_switch_action(toolbar);
|
||||
switchTrackball = lvgl_toolbar_add_switch_action(toolbar);
|
||||
lv_obj_add_event_cb(switchTrackball, onTrackballSwitch, LV_EVENT_VALUE_CHANGED, this);
|
||||
if (tbSettings.trackballEnabled) lv_obj_add_state(switchTrackball, LV_STATE_CHECKED);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#include <lvgl/lvgl_icon_shared.h>
|
||||
#include <lvgl/icons/shared.h>
|
||||
|
||||
#define TAG "usb_settings"
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
#include <Tactility/lvgl/Toolbar.h>
|
||||
#include <Tactility/lvgl/LvglSync.h>
|
||||
|
||||
#include <lvgl/icons/shared.h>
|
||||
#include <lvgl.h>
|
||||
#include <tactility/log.h>
|
||||
#include <lvgl/lvgl_icon_shared.h>
|
||||
|
||||
#include <esp_netif.h>
|
||||
#include <esp_wifi.h>
|
||||
@@ -192,7 +192,7 @@ public:
|
||||
lv_obj_t* toolbar = lvgl::toolbar_create(parent, app);
|
||||
|
||||
// Web Server Enable toggle
|
||||
switchWebServerEnabled = lvgl::toolbar_add_switch_action(toolbar);
|
||||
switchWebServerEnabled = lvgl_toolbar_add_switch_action(toolbar);
|
||||
if (wsSettings.webServerEnabled) {
|
||||
lv_obj_add_state(switchWebServerEnabled, LV_STATE_CHECKED);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <Tactility/app/AppManifest.h>
|
||||
#include <Tactility/app/alertdialog/AlertDialog.h>
|
||||
#include <Tactility/lvgl/Style.h>
|
||||
#include <Tactility/lvgl/Toolbar.h>
|
||||
#include <lvgl/widgets/toolbar.h>
|
||||
#include <Tactility/service/wifi/Wifi.h>
|
||||
#include <Tactility/service/wifi/WifiApSettings.h>
|
||||
|
||||
@@ -138,8 +138,8 @@ public:
|
||||
lv_obj_set_flex_flow(parent, LV_FLEX_FLOW_COLUMN);
|
||||
lv_obj_set_style_pad_row(parent, 0, LV_STATE_DEFAULT);
|
||||
|
||||
auto* toolbar = lvgl::toolbar_create(parent, ssid);
|
||||
busySpinner = lvgl::toolbar_add_spinner_action(toolbar);
|
||||
auto* toolbar = lvgl_toolbar_create(parent, ssid.c_str());
|
||||
busySpinner = lvgl_toolbar_add_spinner_action(toolbar);
|
||||
|
||||
auto* wrapper = lv_obj_create(parent);
|
||||
lv_obj_set_width(wrapper, LV_PCT(100));
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <Tactility/app/wificonnect/View.h>
|
||||
#include <Tactility/app/wificonnect/WifiConnect.h>
|
||||
#include <Tactility/lvgl/Toolbar.h>
|
||||
#include <Tactility/lvgl/Spinner.h>
|
||||
#include <lvgl/widgets/spinner.h>
|
||||
#include <Tactility/service/wifi/WifiApSettings.h>
|
||||
#include <Tactility/service/wifi/WifiGlobals.h>
|
||||
|
||||
@@ -98,7 +98,7 @@ void View::createBottomButtons(lv_obj_t* parent) {
|
||||
lv_obj_align(remember_label, LV_ALIGN_CENTER, 0, 0);
|
||||
lv_obj_align_to(remember_label, remember_switch, LV_ALIGN_OUT_RIGHT_MID, 4, 0);
|
||||
|
||||
connecting_spinner = tt::lvgl::spinner_create(button_container);
|
||||
connecting_spinner = lvgl_spinner_create(button_container);
|
||||
lv_obj_align(connecting_spinner, LV_ALIGN_RIGHT_MID, 0, 0);
|
||||
lv_obj_add_flag(connecting_spinner, LV_OBJ_FLAG_HIDDEN);
|
||||
|
||||
|
||||
@@ -302,9 +302,9 @@ void View::init(const AppContext& app, lv_obj_t* parent) {
|
||||
|
||||
lv_obj_t* toolbar = lvgl::toolbar_create(parent, app);
|
||||
|
||||
scanning_spinner = lvgl::toolbar_add_spinner_action(toolbar);
|
||||
scanning_spinner = lvgl_toolbar_add_spinner_action(toolbar);
|
||||
|
||||
enable_switch = lvgl::toolbar_add_switch_action(toolbar);
|
||||
enable_switch = lvgl_toolbar_add_switch_action(toolbar);
|
||||
lv_obj_add_event_cb(enable_switch, onEnableSwitchChanged, LV_EVENT_VALUE_CHANGED, bindings);
|
||||
|
||||
// Networks
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
#include <Tactility/lvgl/LvglSync.h>
|
||||
#include <Tactility/service/loader/Loader.h>
|
||||
|
||||
#include <lvgl/icons/shared.h>
|
||||
#include <tactility/log.h>
|
||||
#include <lvgl/lvgl_icon_shared.h>
|
||||
|
||||
namespace tt::app::wifimanage {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user