Rename icons

This commit is contained in:
Ken Van Hoeylandt 2026-02-15 02:10:36 +01:00
parent 95fd551cd6
commit 2d9ab70510
33 changed files with 152 additions and 148 deletions

View File

@ -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")

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -10,7 +10,7 @@
#include "tactility/drivers/uart_controller.h"
#include <cstring>
#include <lvgl.h>
#include <tactility/lvgl_symbols_shared.h>
#include <tactility/lvgl_icon_shared.h>
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<AddGpsApp>

View File

@ -12,7 +12,7 @@
#include <Tactility/service/wifi/Wifi.h>
#include <lvgl.h>
#include <tactility/lvgl_symbols_shared.h>
#include <tactility/lvgl_icon_shared.h>
#include <algorithm>
#include <format>
@ -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<AppHubApp>,
};

View File

@ -6,7 +6,7 @@
#include <algorithm>
#include <tactility/lvgl_fonts.h>
#include <tactility/lvgl_symbols_shared.h>
#include <tactility/lvgl_icon_shared.h>
namespace tt::app::applist {
@ -18,7 +18,7 @@ class AppListApp final : public App {
}
static void createAppWidget(const std::shared_ptr<AppManifest>& 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);

View File

@ -1,5 +1,5 @@
#include <tactility/lvgl_fonts.h>
#include <tactility/lvgl_symbols_shared.h>
#include <tactility/lvgl_icon_shared.h>
#include <Tactility/app/AppRegistration.h>
#include <Tactility/app/appdetails/AppDetails.h>
@ -19,7 +19,7 @@ class AppSettingsApp final : public App {
}
static void createAppWidget(const std::shared_ptr<AppManifest>& 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<AppSettingsApp>,
};

View File

@ -14,7 +14,7 @@
#include <algorithm>
#include <cctype>
#include <cstdlib>
#include <tactility/lvgl_symbols_shared.h>
#include <tactility/lvgl_icon_shared.h>
#include <vector>
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<ChatApp>
};

View File

@ -13,7 +13,7 @@
#include <Tactility/service/loader/Loader.h>
#include <Tactility/service/wifi/Wifi.h>
#include <tactility/lvgl_symbols_shared.h>
#include <tactility/lvgl_icon_shared.h>
#include <cstring>
#include <lvgl.h>
@ -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<DevelopmentApp>
};

View File

@ -1,6 +1,6 @@
#include <Tactility/Tactility.h>
#include <tactility/lvgl_symbols_shared.h>
#include <tactility/lvgl_icon_shared.h>
#ifdef ESP_PLATFORM
#include <Tactility/service/displayidle/DisplayIdleService.h>
@ -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<DisplayApp>
};

View File

@ -10,7 +10,7 @@
#include <Tactility/service/gps/GpsState.h>
#include <Tactility/service/loader/Loader.h>
#include <tactility/lvgl_symbols_shared.h>
#include <tactility/lvgl_icon_shared.h>
#include <cstring>
#include <format>
@ -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<GpsSettingsApp>
};

View File

@ -15,7 +15,7 @@
#include <format>
#include <tactility/lvgl_symbols_shared.h>
#include <tactility/lvgl_icon_shared.h>
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<I2cScannerApp>
};

View File

@ -5,7 +5,7 @@
#include <Tactility/settings/KeyboardSettings.h>
#include <Tactility/lvgl/Toolbar.h>
#include <tactility/lvgl_symbols_shared.h>
#include <tactility/lvgl_icon_shared.h>
#include <lvgl.h>
@ -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<KeyboardSettingsApp>
};

View File

@ -11,7 +11,7 @@
#include <lvgl.h>
#include <tactility/lvgl_fonts.h>
#include <tactility/lvgl_symbols_launcher.h>
#include <tactility/lvgl_icon_launcher.h>
namespace tt::app::launcher {
@ -151,9 +151,9 @@ public:
margin = std::min<int32_t>(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);

View File

@ -8,7 +8,7 @@
#include <Tactility/settings/Language.h>
#include <Tactility/settings/SystemSettings.h>
#include <tactility/lvgl_symbols_shared.h>
#include <tactility/lvgl_icon_shared.h>
#include <lvgl.h>
#include <map>
@ -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<LocaleSettingsApp>
};

View File

@ -8,7 +8,7 @@
#include <Tactility/file/File.h>
#include <lvgl.h>
#include <tactility/lvgl_symbols_shared.h>
#include <tactility/lvgl_icon_shared.h>
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<NotesApp>
};

View File

@ -8,7 +8,7 @@
#include <Tactility/Timer.h>
#include <tactility/hal/Device.h>
#include <tactility/lvgl_symbols_shared.h>
#include <tactility/lvgl_icon_shared.h>
#include <lvgl.h>
@ -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<PowerApp>
};

View File

@ -15,7 +15,7 @@
#include <Tactility/service/screenshot/Screenshot.h>
#include <Tactility/Timer.h>
#include <tactility/lvgl_symbols_shared.h>
#include <tactility/lvgl_icon_shared.h>
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<ScreenshotApp>
};

View File

@ -3,7 +3,7 @@
#include <Tactility/service/loader/Loader.h>
#include <tactility/check.h>
#include <tactility/lvgl_symbols_shared.h>
#include <tactility/lvgl_icon_shared.h>
#include <tactility/lvgl_fonts.h>
#include <lvgl.h>
@ -20,7 +20,7 @@ static void onAppPressed(lv_event_t* e) {
static void createWidget(const std::shared_ptr<AppManifest>& manifest, void* parent) {
check(parent);
auto* list = static_cast<lv_obj_t*>(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<SettingsApp>

View File

@ -11,7 +11,7 @@
#include <lvgl.h>
#include <tactility/lvgl_fonts.h>
#include <tactility/hal/Device.h>
#include <tactility/lvgl_symbols_shared.h>
#include <tactility/lvgl_icon_shared.h>
#include <utility>
#include <cstring>
@ -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<SystemInfoApp>
};

View File

@ -10,7 +10,7 @@
#include <lvgl.h>
#include <tactility/lvgl_symbols_shared.h>
#include <tactility/lvgl_icon_shared.h>
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<TimeDateSettingsApp>
};

View File

@ -1,5 +1,5 @@
#include <tactility/lvgl_fonts.h>
#include <tactility/lvgl_symbols_shared.h>
#include <tactility/lvgl_icon_shared.h>
#include <Tactility/app/AppContext.h>
#include <Tactility/app/AppManifest.h>
@ -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");

View File

@ -7,7 +7,7 @@
#include <lvgl.h>
#include <tactility/lvgl_symbols_shared.h>
#include <tactility/lvgl_icon_shared.h>
// 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<TrackballSettingsApp>
};

View File

@ -5,7 +5,7 @@
#include <lvgl.h>
#include <tactility/lvgl_symbols_shared.h>
#include <tactility/lvgl_icon_shared.h>
#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<UsbSettingsApp>
};

View File

@ -12,7 +12,7 @@
#include <Tactility/Logger.h>
#include <lvgl.h>
#include <tactility/lvgl_symbols_shared.h>
#include <tactility/lvgl_icon_shared.h>
#include <esp_netif.h>
#include <esp_wifi.h>
@ -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<WebServerSettingsApp>
};

View File

@ -9,7 +9,7 @@
#include <Tactility/lvgl/LvglSync.h>
#include <Tactility/service/loader/Loader.h>
#include <tactility/lvgl_symbols_shared.h>
#include <tactility/lvgl_icon_shared.h>
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<WifiManage>
};

View File

@ -4,7 +4,7 @@
#include <Tactility/service/ServiceManifest.h>
#include <Tactility/service/memorychecker/MemoryCheckerService.h>
#include <tactility/lvgl_symbols_statusbar.h>
#include <tactility/lvgl_icon_statusbar.h>
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);

View File

@ -14,7 +14,7 @@
#include <Tactility/service/gps/GpsService.h>
#include <Tactility/service/wifi/Wifi.h>
#include <tactility/lvgl_symbols_statusbar.h>
#include <tactility/lvgl_icon_statusbar.h>
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);

View File

@ -31,7 +31,7 @@
#include <lv_screenshot.h>
#endif
#include <tactility/lvgl_symbols_statusbar.h>
#include <tactility/lvgl_icon_statusbar.h>
#include <atomic>
#include <cctype>
@ -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");