diff --git a/Modules/lvgl-module/assets/generate-all.py b/Modules/lvgl-module/assets/generate-all.py index d2440397..483a55c5 100644 --- a/Modules/lvgl-module/assets/generate-all.py +++ b/Modules/lvgl-module/assets/generate-all.py @@ -43,7 +43,8 @@ def generate_icon_fonts(font_file, font_sizes, symbols, output): for size in font_sizes: generate(2, size, font_file, symbols, output) -def generate_icon_names(codepoint_map: dict, codepoint_names: list, filename: str): +def generate_icon_names(codepoint_map: dict, codepoint_names: list, variable_name: str): + filename = f"lvgl_icon_{variable_name}.h" print(f"Generating {filename}") output_path = os.path.join("..", "include", "tactility", filename) with open(output_path, 'w') as f: @@ -58,12 +59,13 @@ def generate_icon_names(codepoint_map: dict, codepoint_names: list, filename: st utf8_bytes = chr(val).encode('utf-8') escaped_str = "".join(f"\\x{b:02X}" for b in utf8_bytes) - f.write(f'#define LVGL_SYMBOL_{safe_name.upper()} "{escaped_str}"\n') + f.write(f'#define LVGL_ICON_{variable_name.upper()}_{safe_name.upper()} "{escaped_str}"\n') else: print(f"Warning: {safe_name} not found in codepoint map") # --------------- Symbol Fonts --------------- +# Get more from https://fonts.google.com/icons?icon.set=Material+Symbols&icon.style=Rounded shared_symbol_code_point_names = [ "add", "apps", @@ -109,6 +111,7 @@ shared_symbol_code_point_names = [ "wifi", # WiFi (settings) app ] +# Get more from https://fonts.google.com/icons?icon.set=Material+Symbols&icon.style=Rounded statusbar_symbol_code_point_names = [ # Location tracking "location_on", @@ -138,6 +141,7 @@ statusbar_symbol_code_point_names = [ "battery_android_frame_bolt" ] +# Get more from https://fonts.google.com/icons?icon.set=Material+Symbols&icon.style=Rounded launcher_symbol_code_point_names = [ "apps", "folder", @@ -188,15 +192,15 @@ codepoints_map = read_code_points_map(codepoints_map_path) # Shared symbols shared_symbol_code_points = get_code_points(codepoints_map, shared_symbol_code_point_names) generate_icon_fonts(ttf_filename, shared_symbol_sizes, shared_symbol_code_points, "material_symbols_shared") -generate_icon_names(codepoints_map, shared_symbol_code_point_names, "lvgl_symbols_shared.h") +generate_icon_names(codepoints_map, shared_symbol_code_point_names, "shared") # Statusbar symbols statusbar_symbol_code_points = get_code_points(codepoints_map, statusbar_symbol_code_point_names) generate_icon_fonts(ttf_filename, statusbar_symbol_sizes, statusbar_symbol_code_points, "material_symbols_statusbar") -generate_icon_names(codepoints_map, statusbar_symbol_code_point_names, "lvgl_symbols_statusbar.h") +generate_icon_names(codepoints_map, statusbar_symbol_code_point_names, "statusbar") # Launcher symbols launcher_symbol_code_points = get_code_points(codepoints_map, launcher_symbol_code_point_names) generate_icon_fonts(ttf_filename, launcher_symbol_sizes, launcher_symbol_code_points, "material_symbols_launcher") -generate_icon_names(codepoints_map, launcher_symbol_code_point_names, "lvgl_symbols_launcher.h") +generate_icon_names(codepoints_map, launcher_symbol_code_point_names, "launcher") diff --git a/Modules/lvgl-module/include/tactility/lvgl_icon_launcher.h b/Modules/lvgl-module/include/tactility/lvgl_icon_launcher.h new file mode 100644 index 00000000..000f4abd --- /dev/null +++ b/Modules/lvgl-module/include/tactility/lvgl_icon_launcher.h @@ -0,0 +1,5 @@ +#pragma once + +#define LVGL_ICON_LAUNCHER_APPS "\xEE\x97\x83" +#define LVGL_ICON_LAUNCHER_FOLDER "\xEE\x8B\x87" +#define LVGL_ICON_LAUNCHER_SETTINGS "\xEE\xA2\xB8" diff --git a/Modules/lvgl-module/include/tactility/lvgl_icon_shared.h b/Modules/lvgl-module/include/tactility/lvgl_icon_shared.h new file mode 100644 index 00000000..41dd1bf9 --- /dev/null +++ b/Modules/lvgl-module/include/tactility/lvgl_icon_shared.h @@ -0,0 +1,44 @@ +#pragma once + +#define LVGL_ICON_SHARED_ADD "\xEE\x85\x85" +#define LVGL_ICON_SHARED_APPS "\xEE\x97\x83" +#define LVGL_ICON_SHARED_AREA_CHART "\xEE\x9D\xB0" +#define LVGL_ICON_SHARED_APP_REGISTRATION "\xEE\xBD\x80" +#define LVGL_ICON_SHARED_CALENDAR_MONTH "\xEE\xAF\x8C" +#define LVGL_ICON_SHARED_CABLE "\xEE\xBF\xA6" +#define LVGL_ICON_SHARED_CIRCLE "\xEE\xBD\x8A" +#define LVGL_ICON_SHARED_CLOSE "\xEE\x97\x8D" +#define LVGL_ICON_SHARED_CLOUD "\xEF\x85\x9C" +#define LVGL_ICON_SHARED_CHECK "\xEE\x97\x8A" +#define LVGL_ICON_SHARED_DELETE "\xEE\xA4\xAE" +#define LVGL_ICON_SHARED_DEVICES "\xEE\x8C\xA6" +#define LVGL_ICON_SHARED_DISPLAY_SETTINGS "\xEE\xAE\x97" +#define LVGL_ICON_SHARED_EDIT_NOTE "\xEE\x9D\x85" +#define LVGL_ICON_SHARED_ELECTRIC_BOLT "\xEE\xB0\x9C" +#define LVGL_ICON_SHARED_FOLDER "\xEE\x8B\x87" +#define LVGL_ICON_SHARED_DEPLOYED_CODE "\xEF\x9C\xA0" +#define LVGL_ICON_SHARED_DOWNLOAD "\xEF\x82\x90" +#define LVGL_ICON_SHARED_FORUM "\xEE\xA2\xAF" +#define LVGL_ICON_SHARED_GAMEPAD "\xEE\x8C\x8F" +#define LVGL_ICON_SHARED_HELP "\xEE\xA3\xBD" +#define LVGL_ICON_SHARED_HUB "\xEE\xA7\xB4" +#define LVGL_ICON_SHARED_IMAGE "\xEE\x8F\xB4" +#define LVGL_ICON_SHARED_KEYBOARD_ARROW_UP "\xEE\x8C\x96" +#define LVGL_ICON_SHARED_LIGHTBULB "\xEE\xA4\x8F" +#define LVGL_ICON_SHARED_LANGUAGE "\xEE\xA2\x94" +#define LVGL_ICON_SHARED_LISTS "\xEE\xA6\xB9" +#define LVGL_ICON_SHARED_MAIL "\xEE\x85\x99" +#define LVGL_ICON_SHARED_MENU "\xEE\x97\x92" +#define LVGL_ICON_SHARED_MOP "\xEE\x8A\x8D" +#define LVGL_ICON_SHARED_MORE_VERT "\xEE\x97\x94" +#define LVGL_ICON_SHARED_MUSIC_NOTE "\xEE\x90\x85" +#define LVGL_ICON_SHARED_NOTE_ADD "\xEE\xA2\x9C" +#define LVGL_ICON_SHARED_POWER_SETTINGS_NEW "\xEF\xA3\x87" +#define LVGL_ICON_SHARED_REFRESH "\xEE\x97\x95" +#define LVGL_ICON_SHARED_SEARCH "\xEE\xA2\xB6" +#define LVGL_ICON_SHARED_SETTINGS "\xEE\xA2\xB8" +#define LVGL_ICON_SHARED_TOOLBAR "\xEE\xA7\xB7" +#define LVGL_ICON_SHARED_NAVIGATION "\xEE\x95\x9D" +#define LVGL_ICON_SHARED_KEYBOARD_ALT "\xEF\x80\xA8" +#define LVGL_ICON_SHARED_USB "\xEE\x87\xA0" +#define LVGL_ICON_SHARED_WIFI "\xEE\x98\xBE" diff --git a/Modules/lvgl-module/include/tactility/lvgl_icon_statusbar.h b/Modules/lvgl-module/include/tactility/lvgl_icon_statusbar.h new file mode 100644 index 00000000..bf82eedf --- /dev/null +++ b/Modules/lvgl-module/include/tactility/lvgl_icon_statusbar.h @@ -0,0 +1,22 @@ +#pragma once + +#define LVGL_ICON_STATUSBAR_LOCATION_ON "\xEF\x87\x9B" +#define LVGL_ICON_STATUSBAR_CLOUD "\xEF\x85\x9C" +#define LVGL_ICON_STATUSBAR_MEMORY "\xEE\x8C\xA2" +#define LVGL_ICON_STATUSBAR_SD_CARD "\xEE\x98\xA3" +#define LVGL_ICON_STATUSBAR_SD_CARD_ALERT "\xEF\x81\x97" +#define LVGL_ICON_STATUSBAR_SIGNAL_WIFI_0_BAR "\xEF\x82\xB0" +#define LVGL_ICON_STATUSBAR_NETWORK_WIFI_1_BAR "\xEE\xAF\xA4" +#define LVGL_ICON_STATUSBAR_NETWORK_WIFI_2_BAR "\xEE\xAF\x96" +#define LVGL_ICON_STATUSBAR_NETWORK_WIFI_3_BAR "\xEE\xAF\xA1" +#define LVGL_ICON_STATUSBAR_SIGNAL_WIFI_4_BAR "\xEF\x81\xA5" +#define LVGL_ICON_STATUSBAR_SIGNAL_WIFI_OFF "\xEE\x87\x9A" +#define LVGL_ICON_STATUSBAR_SIGNAL_WIFI_BAD "\xEF\x81\xA4" +#define LVGL_ICON_STATUSBAR_BATTERY_ANDROID_FRAME_1 "\xEF\x89\x97" +#define LVGL_ICON_STATUSBAR_BATTERY_ANDROID_FRAME_2 "\xEF\x89\x96" +#define LVGL_ICON_STATUSBAR_BATTERY_ANDROID_FRAME_3 "\xEF\x89\x95" +#define LVGL_ICON_STATUSBAR_BATTERY_ANDROID_FRAME_4 "\xEF\x89\x94" +#define LVGL_ICON_STATUSBAR_BATTERY_ANDROID_FRAME_5 "\xEF\x89\x93" +#define LVGL_ICON_STATUSBAR_BATTERY_ANDROID_FRAME_6 "\xEF\x89\x92" +#define LVGL_ICON_STATUSBAR_BATTERY_ANDROID_FRAME_FULL "\xEF\x89\x8F" +#define LVGL_ICON_STATUSBAR_BATTERY_ANDROID_FRAME_BOLT "\xEF\x89\x90" diff --git a/Modules/lvgl-module/include/tactility/lvgl_symbols_launcher.h b/Modules/lvgl-module/include/tactility/lvgl_symbols_launcher.h deleted file mode 100644 index 686ac2c2..00000000 --- a/Modules/lvgl-module/include/tactility/lvgl_symbols_launcher.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#define LVGL_SYMBOL_APPS "\xEE\x97\x83" -#define LVGL_SYMBOL_FOLDER "\xEE\x8B\x87" -#define LVGL_SYMBOL_SETTINGS "\xEE\xA2\xB8" diff --git a/Modules/lvgl-module/include/tactility/lvgl_symbols_shared.h b/Modules/lvgl-module/include/tactility/lvgl_symbols_shared.h deleted file mode 100644 index cac48dfc..00000000 --- a/Modules/lvgl-module/include/tactility/lvgl_symbols_shared.h +++ /dev/null @@ -1,44 +0,0 @@ -#pragma once - -#define LVGL_SYMBOL_ADD "\xEE\x85\x85" -#define LVGL_SYMBOL_APPS "\xEE\x97\x83" -#define LVGL_SYMBOL_AREA_CHART "\xEE\x9D\xB0" -#define LVGL_SYMBOL_APP_REGISTRATION "\xEE\xBD\x80" -#define LVGL_SYMBOL_CALENDAR_MONTH "\xEE\xAF\x8C" -#define LVGL_SYMBOL_CABLE "\xEE\xBF\xA6" -#define LVGL_SYMBOL_CIRCLE "\xEE\xBD\x8A" -#define LVGL_SYMBOL_CLOSE "\xEE\x97\x8D" -#define LVGL_SYMBOL_CLOUD "\xEF\x85\x9C" -#define LVGL_SYMBOL_CHECK "\xEE\x97\x8A" -#define LVGL_SYMBOL_DELETE "\xEE\xA4\xAE" -#define LVGL_SYMBOL_DEVICES "\xEE\x8C\xA6" -#define LVGL_SYMBOL_DISPLAY_SETTINGS "\xEE\xAE\x97" -#define LVGL_SYMBOL_EDIT_NOTE "\xEE\x9D\x85" -#define LVGL_SYMBOL_ELECTRIC_BOLT "\xEE\xB0\x9C" -#define LVGL_SYMBOL_FOLDER "\xEE\x8B\x87" -#define LVGL_SYMBOL_DEPLOYED_CODE "\xEF\x9C\xA0" -#define LVGL_SYMBOL_DOWNLOAD "\xEF\x82\x90" -#define LVGL_SYMBOL_FORUM "\xEE\xA2\xAF" -#define LVGL_SYMBOL_GAMEPAD "\xEE\x8C\x8F" -#define LVGL_SYMBOL_HELP "\xEE\xA3\xBD" -#define LVGL_SYMBOL_HUB "\xEE\xA7\xB4" -#define LVGL_SYMBOL_IMAGE "\xEE\x8F\xB4" -#define LVGL_SYMBOL_KEYBOARD_ARROW_UP "\xEE\x8C\x96" -#define LVGL_SYMBOL_LIGHTBULB "\xEE\xA4\x8F" -#define LVGL_SYMBOL_LANGUAGE "\xEE\xA2\x94" -#define LVGL_SYMBOL_LISTS "\xEE\xA6\xB9" -#define LVGL_SYMBOL_MAIL "\xEE\x85\x99" -#define LVGL_SYMBOL_MENU "\xEE\x97\x92" -#define LVGL_SYMBOL_MOP "\xEE\x8A\x8D" -#define LVGL_SYMBOL_MORE_VERT "\xEE\x97\x94" -#define LVGL_SYMBOL_MUSIC_NOTE "\xEE\x90\x85" -#define LVGL_SYMBOL_NOTE_ADD "\xEE\xA2\x9C" -#define LVGL_SYMBOL_POWER_SETTINGS_NEW "\xEF\xA3\x87" -#define LVGL_SYMBOL_REFRESH "\xEE\x97\x95" -#define LVGL_SYMBOL_SEARCH "\xEE\xA2\xB6" -#define LVGL_SYMBOL_SETTINGS "\xEE\xA2\xB8" -#define LVGL_SYMBOL_TOOLBAR "\xEE\xA7\xB7" -#define LVGL_SYMBOL_NAVIGATION "\xEE\x95\x9D" -#define LVGL_SYMBOL_KEYBOARD_ALT "\xEF\x80\xA8" -#define LVGL_SYMBOL_USB "\xEE\x87\xA0" -#define LVGL_SYMBOL_WIFI "\xEE\x98\xBE" diff --git a/Modules/lvgl-module/include/tactility/lvgl_symbols_statusbar.h b/Modules/lvgl-module/include/tactility/lvgl_symbols_statusbar.h deleted file mode 100644 index e1c40cef..00000000 --- a/Modules/lvgl-module/include/tactility/lvgl_symbols_statusbar.h +++ /dev/null @@ -1,22 +0,0 @@ -#pragma once - -#define LVGL_SYMBOL_LOCATION_ON "\xEF\x87\x9B" -#define LVGL_SYMBOL_CLOUD "\xEF\x85\x9C" -#define LVGL_SYMBOL_MEMORY "\xEE\x8C\xA2" -#define LVGL_SYMBOL_SD_CARD "\xEE\x98\xA3" -#define LVGL_SYMBOL_SD_CARD_ALERT "\xEF\x81\x97" -#define LVGL_SYMBOL_SIGNAL_WIFI_0_BAR "\xEF\x82\xB0" -#define LVGL_SYMBOL_NETWORK_WIFI_1_BAR "\xEE\xAF\xA4" -#define LVGL_SYMBOL_NETWORK_WIFI_2_BAR "\xEE\xAF\x96" -#define LVGL_SYMBOL_NETWORK_WIFI_3_BAR "\xEE\xAF\xA1" -#define LVGL_SYMBOL_SIGNAL_WIFI_4_BAR "\xEF\x81\xA5" -#define LVGL_SYMBOL_SIGNAL_WIFI_OFF "\xEE\x87\x9A" -#define LVGL_SYMBOL_SIGNAL_WIFI_BAD "\xEF\x81\xA4" -#define LVGL_SYMBOL_BATTERY_ANDROID_FRAME_1 "\xEF\x89\x97" -#define LVGL_SYMBOL_BATTERY_ANDROID_FRAME_2 "\xEF\x89\x96" -#define LVGL_SYMBOL_BATTERY_ANDROID_FRAME_3 "\xEF\x89\x95" -#define LVGL_SYMBOL_BATTERY_ANDROID_FRAME_4 "\xEF\x89\x94" -#define LVGL_SYMBOL_BATTERY_ANDROID_FRAME_5 "\xEF\x89\x93" -#define LVGL_SYMBOL_BATTERY_ANDROID_FRAME_6 "\xEF\x89\x92" -#define LVGL_SYMBOL_BATTERY_ANDROID_FRAME_FULL "\xEF\x89\x8F" -#define LVGL_SYMBOL_BATTERY_ANDROID_FRAME_BOLT "\xEF\x89\x90" diff --git a/Tactility/Source/app/addgps/AddGps.cpp b/Tactility/Source/app/addgps/AddGps.cpp index 783e9785..d1f1cf6a 100644 --- a/Tactility/Source/app/addgps/AddGps.cpp +++ b/Tactility/Source/app/addgps/AddGps.cpp @@ -10,7 +10,7 @@ #include "tactility/drivers/uart_controller.h" #include #include -#include +#include namespace tt::app::addgps { @@ -194,7 +194,7 @@ public: extern const AppManifest manifest = { .appId = "AddGps", .appName = "Add GPS", - .appIcon = LVGL_SYMBOL_NAVIGATION, + .appIcon = LVGL_ICON_SHARED_NAVIGATION, .appCategory = Category::System, .appFlags = AppManifest::Flags::Hidden, .createApp = create diff --git a/Tactility/Source/app/apphub/AppHubApp.cpp b/Tactility/Source/app/apphub/AppHubApp.cpp index f151986d..bc7cf919 100644 --- a/Tactility/Source/app/apphub/AppHubApp.cpp +++ b/Tactility/Source/app/apphub/AppHubApp.cpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include @@ -179,7 +179,7 @@ public: extern const AppManifest manifest = { .appId = "AppHub", .appName = "App Hub", - .appIcon = LVGL_SYMBOL_HUB, + .appIcon = LVGL_ICON_SHARED_HUB, .appCategory = Category::System, .createApp = create, }; diff --git a/Tactility/Source/app/applist/AppList.cpp b/Tactility/Source/app/applist/AppList.cpp index dda699ca..bdc35ff2 100644 --- a/Tactility/Source/app/applist/AppList.cpp +++ b/Tactility/Source/app/applist/AppList.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include namespace tt::app::applist { @@ -18,7 +18,7 @@ class AppListApp final : public App { } static void createAppWidget(const std::shared_ptr& manifest, lv_obj_t* list) { - const void* icon = !manifest->appIcon.empty() ? manifest->appIcon.c_str() : LVGL_SYMBOL_TOOLBAR; + const void* icon = !manifest->appIcon.empty() ? manifest->appIcon.c_str() : LVGL_ICON_SHARED_TOOLBAR; lv_obj_t* btn = lv_list_add_button(list, icon, manifest->appName.c_str()); lv_obj_t* image = lv_obj_get_child(btn, 0); lv_obj_set_style_text_font(image, lvgl_get_shared_icon_font(), LV_PART_MAIN); diff --git a/Tactility/Source/app/appsettings/AppSettings.cpp b/Tactility/Source/app/appsettings/AppSettings.cpp index c34441b4..8a4210d9 100644 --- a/Tactility/Source/app/appsettings/AppSettings.cpp +++ b/Tactility/Source/app/appsettings/AppSettings.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include @@ -19,7 +19,7 @@ class AppSettingsApp final : public App { } static void createAppWidget(const std::shared_ptr& manifest, lv_obj_t* list) { - const void* icon = !manifest->appIcon.empty() ? manifest->appIcon.c_str() : LVGL_SYMBOL_TOOLBAR; + const void* icon = !manifest->appIcon.empty() ? manifest->appIcon.c_str() : LVGL_ICON_SHARED_TOOLBAR; lv_obj_t* btn = lv_list_add_button(list, icon, manifest->appName.c_str()); lv_obj_t* image = lv_obj_get_child(btn, 0); lv_obj_set_style_text_font(image, lvgl_get_shared_icon_font(), LV_PART_MAIN); @@ -62,7 +62,7 @@ public: extern const AppManifest manifest = { .appId = "AppSettings", .appName = "Apps", - .appIcon = LVGL_SYMBOL_APPS, + .appIcon = LVGL_ICON_SHARED_APPS, .appCategory = Category::Settings, .createApp = create, }; diff --git a/Tactility/Source/app/chat/ChatApp.cpp b/Tactility/Source/app/chat/ChatApp.cpp index 25a3d0f7..a42e7a89 100644 --- a/Tactility/Source/app/chat/ChatApp.cpp +++ b/Tactility/Source/app/chat/ChatApp.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include namespace tt::app::chat { @@ -181,7 +181,7 @@ void ChatApp::switchChannel(const std::string& chatChannel) { extern const AppManifest manifest = { .appId = "Chat", .appName = "Chat", - .appIcon = LVGL_SYMBOL_FORUM, + .appIcon = LVGL_ICON_FORUM, .createApp = create }; diff --git a/Tactility/Source/app/development/Development.cpp b/Tactility/Source/app/development/Development.cpp index 21b9c71b..fa6701c1 100644 --- a/Tactility/Source/app/development/Development.cpp +++ b/Tactility/Source/app/development/Development.cpp @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include @@ -165,7 +165,7 @@ public: extern const AppManifest manifest = { .appId = "Development", .appName = "Development", - .appIcon = LVGL_SYMBOL_DEVICES, + .appIcon = LVGL_ICON_SHARED_DEVICES, .appCategory = Category::Settings, .createApp = create }; diff --git a/Tactility/Source/app/display/Display.cpp b/Tactility/Source/app/display/Display.cpp index 9476913f..0e9a9507 100644 --- a/Tactility/Source/app/display/Display.cpp +++ b/Tactility/Source/app/display/Display.cpp @@ -1,6 +1,6 @@ #include -#include +#include #ifdef ESP_PLATFORM #include @@ -306,7 +306,7 @@ public: extern const AppManifest manifest = { .appId = "Display", .appName = "Display", - .appIcon = LVGL_SYMBOL_DISPLAY_SETTINGS, + .appIcon = LVGL_ICON_SHARED_DISPLAY_SETTINGS, .appCategory = Category::Settings, .createApp = create }; diff --git a/Tactility/Source/app/gpssettings/GpsSettings.cpp b/Tactility/Source/app/gpssettings/GpsSettings.cpp index 396acbdc..9c3e7d8e 100644 --- a/Tactility/Source/app/gpssettings/GpsSettings.cpp +++ b/Tactility/Source/app/gpssettings/GpsSettings.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include @@ -455,7 +455,7 @@ public: extern const AppManifest manifest = { .appId = "GpsSettings", .appName = "GPS", - .appIcon = LVGL_SYMBOL_NAVIGATION, + .appIcon = LVGL_ICON_SHARED_NAVIGATION, .appCategory = Category::Settings, .createApp = create }; diff --git a/Tactility/Source/app/i2cscanner/I2cScanner.cpp b/Tactility/Source/app/i2cscanner/I2cScanner.cpp index 52d0d92e..a9664388 100644 --- a/Tactility/Source/app/i2cscanner/I2cScanner.cpp +++ b/Tactility/Source/app/i2cscanner/I2cScanner.cpp @@ -15,7 +15,7 @@ #include -#include +#include namespace tt::app::i2cscanner { @@ -411,7 +411,7 @@ void I2cScannerApp::onScanTimerFinished() { extern const AppManifest manifest = { .appId = "I2cScanner", .appName = "I2C Scanner", - .appIcon = LVGL_SYMBOL_SEARCH, + .appIcon = LVGL_ICON_SHARED_SEARCH, .appCategory = Category::System, .createApp = create }; diff --git a/Tactility/Source/app/keyboard/KeyboardSettings.cpp b/Tactility/Source/app/keyboard/KeyboardSettings.cpp index a343a89b..3e6223d2 100644 --- a/Tactility/Source/app/keyboard/KeyboardSettings.cpp +++ b/Tactility/Source/app/keyboard/KeyboardSettings.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include #include @@ -183,7 +183,7 @@ public: extern const AppManifest manifest = { .appId = "KeyboardSettings", .appName = "Keyboard", - .appIcon = LVGL_SYMBOL_KEYBOARD_ALT, + .appIcon = LVGL_ICON_SHARED_KEYBOARD_ALT, .appCategory = Category::Settings, .createApp = create }; diff --git a/Tactility/Source/app/launcher/Launcher.cpp b/Tactility/Source/app/launcher/Launcher.cpp index 81ef95e9..3b6cc8d2 100644 --- a/Tactility/Source/app/launcher/Launcher.cpp +++ b/Tactility/Source/app/launcher/Launcher.cpp @@ -11,7 +11,7 @@ #include #include -#include +#include namespace tt::app::launcher { @@ -151,9 +151,9 @@ public: margin = std::min(available_height / 16, total_button_size / 2); } - createAppButton(buttons_wrapper, ui_density, LVGL_SYMBOL_APPS, "AppList", margin, is_landscape_display); - createAppButton(buttons_wrapper, ui_density, LVGL_SYMBOL_FOLDER, "Files", margin, is_landscape_display); - createAppButton(buttons_wrapper, ui_density, LVGL_SYMBOL_SETTINGS, "Settings", margin, is_landscape_display); + createAppButton(buttons_wrapper, ui_density, LVGL_ICON_LAUNCHER_APPS, "AppList", margin, is_landscape_display); + createAppButton(buttons_wrapper, ui_density, LVGL_ICON_LAUNCHER_FOLDER, "Files", margin, is_landscape_display); + createAppButton(buttons_wrapper, ui_density, LVGL_ICON_LAUNCHER_SETTINGS, "Settings", margin, is_landscape_display); if (shouldShowPowerButton()) { auto* power_button = lv_btn_create(parent); diff --git a/Tactility/Source/app/localesettings/LocaleSettings.cpp b/Tactility/Source/app/localesettings/LocaleSettings.cpp index 6edd0de9..f9523d00 100644 --- a/Tactility/Source/app/localesettings/LocaleSettings.cpp +++ b/Tactility/Source/app/localesettings/LocaleSettings.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include @@ -160,7 +160,7 @@ public: extern const AppManifest manifest = { .appId = "LocaleSettings", .appName = "Region & Language", - .appIcon = LVGL_SYMBOL_LANGUAGE, + .appIcon = LVGL_ICON_SHARED_LANGUAGE, .appCategory = Category::Settings, .createApp = create }; diff --git a/Tactility/Source/app/notes/Notes.cpp b/Tactility/Source/app/notes/Notes.cpp index 217ec7c1..7cd56571 100644 --- a/Tactility/Source/app/notes/Notes.cpp +++ b/Tactility/Source/app/notes/Notes.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include namespace tt::app::notes { @@ -209,7 +209,7 @@ class NotesApp final : public App { extern const AppManifest manifest = { .appId = "Notes", .appName = "Notes", - .appIcon = LVGL_SYMBOL_EDIT_NOTE, + .appIcon = LVGL_ICON_SHARED_EDIT_NOTE, .createApp = create }; diff --git a/Tactility/Source/app/power/Power.cpp b/Tactility/Source/app/power/Power.cpp index a0813553..6d706509 100644 --- a/Tactility/Source/app/power/Power.cpp +++ b/Tactility/Source/app/power/Power.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include @@ -192,7 +192,7 @@ public: extern const AppManifest manifest = { .appId = "Power", .appName = "Power", - .appIcon = LVGL_SYMBOL_ELECTRIC_BOLT, + .appIcon = LVGL_ICON_SHARED_ELECTRIC_BOLT, .appCategory = Category::Settings, .createApp = create }; diff --git a/Tactility/Source/app/screenshot/Screenshot.cpp b/Tactility/Source/app/screenshot/Screenshot.cpp index 8593d898..8394b80d 100644 --- a/Tactility/Source/app/screenshot/Screenshot.cpp +++ b/Tactility/Source/app/screenshot/Screenshot.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include namespace tt::app::screenshot { @@ -285,7 +285,7 @@ void ScreenshotApp::onShow(AppContext& appContext, lv_obj_t* parent) { extern const AppManifest manifest = { .appId = "Screenshot", .appName = "Screenshot", - .appIcon = LVGL_SYMBOL_IMAGE, + .appIcon = LVGL_ICON_SHARED_IMAGE, .appCategory = Category::System, .createApp = create }; diff --git a/Tactility/Source/app/settings/Settings.cpp b/Tactility/Source/app/settings/Settings.cpp index d174fb2e..f641195f 100644 --- a/Tactility/Source/app/settings/Settings.cpp +++ b/Tactility/Source/app/settings/Settings.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include @@ -20,7 +20,7 @@ static void onAppPressed(lv_event_t* e) { static void createWidget(const std::shared_ptr& manifest, void* parent) { check(parent); auto* list = static_cast(parent); - const void* icon = !manifest->appIcon.empty() ? manifest->appIcon.c_str() : LVGL_SYMBOL_TOOLBAR; + const void* icon = !manifest->appIcon.empty() ? manifest->appIcon.c_str() : LVGL_ICON_SHARED_TOOLBAR; auto* btn = lv_list_add_button(list, icon, manifest->appName.c_str()); lv_obj_t* image = lv_obj_get_child(btn, 0); lv_obj_set_style_text_font(image, lvgl_get_shared_icon_font(), LV_PART_MAIN); @@ -52,7 +52,7 @@ class SettingsApp final : public App { extern const AppManifest manifest = { .appId = "Settings", .appName = "Settings", - .appIcon = LVGL_SYMBOL_SETTINGS, + .appIcon = LVGL_ICON_SHARED_SETTINGS, .appCategory = Category::System, .appFlags = AppManifest::Flags::Hidden, .createApp = create diff --git a/Tactility/Source/app/systeminfo/SystemInfo.cpp b/Tactility/Source/app/systeminfo/SystemInfo.cpp index 76bf93d6..c42cece2 100644 --- a/Tactility/Source/app/systeminfo/SystemInfo.cpp +++ b/Tactility/Source/app/systeminfo/SystemInfo.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include @@ -700,7 +700,7 @@ class SystemInfoApp final : public App { extern const AppManifest manifest = { .appId = "SystemInfo", .appName = "System Info", - .appIcon = LVGL_SYMBOL_AREA_CHART, + .appIcon = LVGL_ICON_SHARED_AREA_CHART, .appCategory = Category::System, .createApp = create }; diff --git a/Tactility/Source/app/timedatesettings/TimeDateSettings.cpp b/Tactility/Source/app/timedatesettings/TimeDateSettings.cpp index b9d52035..bbf87fb0 100644 --- a/Tactility/Source/app/timedatesettings/TimeDateSettings.cpp +++ b/Tactility/Source/app/timedatesettings/TimeDateSettings.cpp @@ -10,7 +10,7 @@ #include -#include +#include namespace tt::app::timedatesettings { @@ -155,7 +155,7 @@ public: extern const AppManifest manifest = { .appId = "TimeDateSettings", .appName = "Time & Date", - .appIcon = LVGL_SYMBOL_CALENDAR_MONTH, + .appIcon = LVGL_ICON_SHARED_CALENDAR_MONTH, .appCategory = Category::Settings, .createApp = create }; diff --git a/Tactility/Source/app/timezone/TimeZone.cpp b/Tactility/Source/app/timezone/TimeZone.cpp index c015eb20..77a35170 100644 --- a/Tactility/Source/app/timezone/TimeZone.cpp +++ b/Tactility/Source/app/timezone/TimeZone.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include @@ -205,7 +205,7 @@ public: lv_obj_set_style_image_recolor_opa(icon, 255, 0); lv_obj_set_style_image_recolor(icon, lv_theme_get_color_primary(parent), 0); lv_obj_set_style_text_font(icon, lvgl_get_shared_icon_font(), LV_STATE_DEFAULT); - lv_image_set_src(icon, LVGL_SYMBOL_SEARCH); + lv_image_set_src(icon, LVGL_ICON_SHARED_SEARCH); auto* textarea = lv_textarea_create(search_wrapper); lv_textarea_set_placeholder_text(textarea, "e.g. Europe/Amsterdam"); diff --git a/Tactility/Source/app/trackball/TrackballSettings.cpp b/Tactility/Source/app/trackball/TrackballSettings.cpp index f2a93a6c..477fed7e 100644 --- a/Tactility/Source/app/trackball/TrackballSettings.cpp +++ b/Tactility/Source/app/trackball/TrackballSettings.cpp @@ -7,7 +7,7 @@ #include -#include +#include // Forward declare driver functions namespace trackball { @@ -210,7 +210,7 @@ public: extern const AppManifest manifest = { .appId = "TrackballSettings", .appName = "Trackball", - .appIcon = LVGL_SYMBOL_CIRCLE, + .appIcon = LVGL_ICON_SHARED_CIRCLE, .appCategory = Category::Settings, .createApp = create }; diff --git a/Tactility/Source/app/usbsettings/UsbSettings.cpp b/Tactility/Source/app/usbsettings/UsbSettings.cpp index c16109b3..ae8aacfb 100644 --- a/Tactility/Source/app/usbsettings/UsbSettings.cpp +++ b/Tactility/Source/app/usbsettings/UsbSettings.cpp @@ -5,7 +5,7 @@ #include -#include +#include #define TAG "usb_settings" @@ -62,7 +62,7 @@ class UsbSettingsApp : public App { extern const AppManifest manifest = { .appId = "UsbSettings", .appName = "USB", - .appIcon = LVGL_SYMBOL_USB, + .appIcon = LVGL_ICON_SHARED_USB, .appCategory = Category::Settings, .createApp = create }; diff --git a/Tactility/Source/app/webserversettings/WebServerSettings.cpp b/Tactility/Source/app/webserversettings/WebServerSettings.cpp index fda79554..f2acdaf8 100644 --- a/Tactility/Source/app/webserversettings/WebServerSettings.cpp +++ b/Tactility/Source/app/webserversettings/WebServerSettings.cpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include @@ -418,7 +418,7 @@ public: extern const AppManifest manifest = { .appId = "WebServerSettings", .appName = "Web Server", - .appIcon = LVGL_SYMBOL_CLOUD, + .appIcon = LVGL_ICON_SHARED_CLOUD, .appCategory = Category::System, .createApp = create }; diff --git a/Tactility/Source/app/wifimanage/WifiManage.cpp b/Tactility/Source/app/wifimanage/WifiManage.cpp index a890fbf1..d70593b7 100644 --- a/Tactility/Source/app/wifimanage/WifiManage.cpp +++ b/Tactility/Source/app/wifimanage/WifiManage.cpp @@ -9,7 +9,7 @@ #include #include -#include +#include namespace tt::app::wifimanage { @@ -144,7 +144,7 @@ void WifiManage::onHide(AppContext& app) { extern const AppManifest manifest = { .appId = "WifiManage", .appName = "Wi-Fi", - .appIcon = LVGL_SYMBOL_WIFI, + .appIcon = LVGL_ICON_SHARED_WIFI, .appCategory = Category::Settings, .createApp = create }; diff --git a/Tactility/Source/service/memorychecker/MemoryCheckerService.cpp b/Tactility/Source/service/memorychecker/MemoryCheckerService.cpp index 7c3708a2..d017520b 100644 --- a/Tactility/Source/service/memorychecker/MemoryCheckerService.cpp +++ b/Tactility/Source/service/memorychecker/MemoryCheckerService.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include namespace tt::service::memorychecker { @@ -54,7 +54,7 @@ bool MemoryCheckerService::onStart(ServiceContext& service) { auto lock = mutex.asScopedLock(); lock.lock(); - statusbarIconId = lvgl::statusbar_icon_add(LVGL_SYMBOL_MEMORY, false); + statusbarIconId = lvgl::statusbar_icon_add(LVGL_ICON_STATUSBAR_MEMORY, false); lvgl::statusbar_icon_set_visibility(statusbarIconId, false); timer.setCallbackPriority(Thread::Priority::Lower); diff --git a/Tactility/Source/service/statusbar/Statusbar.cpp b/Tactility/Source/service/statusbar/Statusbar.cpp index 705a967e..23c44073 100644 --- a/Tactility/Source/service/statusbar/Statusbar.cpp +++ b/Tactility/Source/service/statusbar/Statusbar.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include namespace tt::service::statusbar { @@ -25,15 +25,15 @@ extern const ServiceManifest manifest; const char* getWifiStatusIconForRssi(int rssi) { if (rssi >= -60) { - return LVGL_SYMBOL_SIGNAL_WIFI_4_BAR; + return LVGL_ICON_STATUSBAR_SIGNAL_WIFI_4_BAR; } else if (rssi >= -70) { - return LVGL_SYMBOL_NETWORK_WIFI_3_BAR; + return LVGL_ICON_STATUSBAR_NETWORK_WIFI_3_BAR; } else if (rssi >= -80) { - return LVGL_SYMBOL_NETWORK_WIFI_2_BAR; + return LVGL_ICON_STATUSBAR_NETWORK_WIFI_2_BAR; } else if (rssi >= -90) { - return LVGL_SYMBOL_NETWORK_WIFI_1_BAR; + return LVGL_ICON_STATUSBAR_NETWORK_WIFI_1_BAR; } else { - return LVGL_SYMBOL_SIGNAL_WIFI_BAD; + return LVGL_ICON_STATUSBAR_SIGNAL_WIFI_BAD; } } @@ -44,10 +44,10 @@ static const char* getWifiStatusIcon(wifi::RadioState state) { case On: case OnPending: case ConnectionPending: - return LVGL_SYMBOL_SIGNAL_WIFI_0_BAR; + return LVGL_ICON_STATUSBAR_SIGNAL_WIFI_0_BAR; case OffPending: case Off: - return LVGL_SYMBOL_SIGNAL_WIFI_OFF; + return LVGL_ICON_STATUSBAR_SIGNAL_WIFI_OFF; case ConnectionActive: rssi = wifi::getRssi(); return getWifiStatusIconForRssi(rssi); @@ -60,11 +60,11 @@ static const char* getSdCardStatusIcon(hal::sdcard::SdCardDevice::State state) { switch (state) { using enum hal::sdcard::SdCardDevice::State; case Mounted: - return LVGL_SYMBOL_SD_CARD; + return LVGL_ICON_STATUSBAR_SD_CARD; case Error: case Unmounted: case Timeout: - return LVGL_SYMBOL_SD_CARD_ALERT; + return LVGL_ICON_STATUSBAR_SD_CARD_ALERT; default: check(false, "Unhandled SdCard state"); } @@ -93,19 +93,19 @@ static const char* getPowerStatusIcon() { uint8_t charge = charge_level.valueAsUint8; if (charge >= 95) { - return LVGL_SYMBOL_BATTERY_ANDROID_FRAME_FULL; + return LVGL_ICON_STATUSBAR_BATTERY_ANDROID_FRAME_FULL; } else if (charge >= 80) { - return LVGL_SYMBOL_BATTERY_ANDROID_FRAME_6; + return LVGL_ICON_STATUSBAR_BATTERY_ANDROID_FRAME_6; } else if (charge >= 64) { - return LVGL_SYMBOL_BATTERY_ANDROID_FRAME_5; + return LVGL_ICON_STATUSBAR_BATTERY_ANDROID_FRAME_5; } else if (charge >= 48) { - return LVGL_SYMBOL_BATTERY_ANDROID_FRAME_4; + return LVGL_ICON_STATUSBAR_BATTERY_ANDROID_FRAME_4; } else if (charge >= 32) { - return LVGL_SYMBOL_BATTERY_ANDROID_FRAME_3; + return LVGL_ICON_STATUSBAR_BATTERY_ANDROID_FRAME_3; } else if (charge >= 16) { - return LVGL_SYMBOL_BATTERY_ANDROID_FRAME_2; + return LVGL_ICON_STATUSBAR_BATTERY_ANDROID_FRAME_2; } else { - return LVGL_SYMBOL_BATTERY_ANDROID_FRAME_1; + return LVGL_ICON_STATUSBAR_BATTERY_ANDROID_FRAME_1; } } @@ -135,7 +135,7 @@ class StatusbarService final : public Service { bool show_icon = (gps_state == gps::State::OnPending) || (gps_state == gps::State::On); if (gps_last_state != show_icon) { if (show_icon) { - lvgl::statusbar_icon_set_image(gps_icon_id, LVGL_SYMBOL_LOCATION_ON); + lvgl::statusbar_icon_set_image(gps_icon_id, LVGL_ICON_STATUSBAR_LOCATION_ON); lvgl::statusbar_icon_set_visibility(gps_icon_id, true); } else { lvgl::statusbar_icon_set_visibility(gps_icon_id, false); diff --git a/Tactility/Source/service/webserver/WebServerService.cpp b/Tactility/Source/service/webserver/WebServerService.cpp index bc78335e..6c34b7c7 100644 --- a/Tactility/Source/service/webserver/WebServerService.cpp +++ b/Tactility/Source/service/webserver/WebServerService.cpp @@ -31,7 +31,7 @@ #include #endif -#include +#include #include #include @@ -522,7 +522,7 @@ bool WebServerService::startServer() { // Show statusbar icon if (statusbarIconId >= 0) { - lvgl::statusbar_icon_set_image(statusbarIconId, LVGL_SYMBOL_CLOUD); + lvgl::statusbar_icon_set_image(statusbarIconId, LVGL_ICON_STATUSBAR_CLOUD); lvgl::statusbar_icon_set_visibility(statusbarIconId, true); LOGGER.info("WebServer statusbar icon shown ({} mode)", settings.wifiMode == settings::webserver::WiFiMode::AccessPoint ? "AP" : "Station");