diff --git a/Buildscripts/module.cmake b/Buildscripts/module.cmake index 276ea1bd8..9c148b3a7 100644 --- a/Buildscripts/module.cmake +++ b/Buildscripts/module.cmake @@ -2,6 +2,14 @@ if (COMMAND tactility_add_module) return() endif() +macro(tactility_get_module_name NAME OUT_NAME) + if (DEFINED ENV{ESP_IDF_VERSION}) + set(${OUT_NAME} ${COMPONENT_LIB}) + else () + set(${OUT_NAME} ${NAME}) + endif () +endmacro() + macro(tactility_add_module NAME) set(options) set(oneValueArgs) diff --git a/Data/system/app/Launcher/assets/icon_apps.png b/Data/system/app/Launcher/assets/icon_apps.png deleted file mode 100644 index d75002768..000000000 Binary files a/Data/system/app/Launcher/assets/icon_apps.png and /dev/null differ diff --git a/Data/system/app/Launcher/assets/icon_files.png b/Data/system/app/Launcher/assets/icon_files.png deleted file mode 100644 index e0919072a..000000000 Binary files a/Data/system/app/Launcher/assets/icon_files.png and /dev/null differ diff --git a/Data/system/app/Launcher/assets/icon_settings.png b/Data/system/app/Launcher/assets/icon_settings.png deleted file mode 100644 index ba33da9f3..000000000 Binary files a/Data/system/app/Launcher/assets/icon_settings.png and /dev/null differ diff --git a/Data/system/app_icon_chat_dark_mode.png b/Data/system/app_icon_chat_dark_mode.png deleted file mode 100644 index 89e68726b..000000000 Binary files a/Data/system/app_icon_chat_dark_mode.png and /dev/null differ diff --git a/Data/system/app_icon_display_settings_dark_mode.png b/Data/system/app_icon_display_settings_dark_mode.png deleted file mode 100644 index 5f81d1528..000000000 Binary files a/Data/system/app_icon_display_settings_dark_mode.png and /dev/null differ diff --git a/Data/system/app_icon_fallback_dark_mode.png b/Data/system/app_icon_fallback_dark_mode.png deleted file mode 100644 index 45aa4963c..000000000 Binary files a/Data/system/app_icon_fallback_dark_mode.png and /dev/null differ diff --git a/Data/system/app_icon_files_dark_mode.png b/Data/system/app_icon_files_dark_mode.png deleted file mode 100644 index 2d7b0eaf4..000000000 Binary files a/Data/system/app_icon_files_dark_mode.png and /dev/null differ diff --git a/Data/system/app_icon_gpio_dark_mode.png b/Data/system/app_icon_gpio_dark_mode.png deleted file mode 100644 index e7536da29..000000000 Binary files a/Data/system/app_icon_gpio_dark_mode.png and /dev/null differ diff --git a/Data/system/app_icon_i2c_dark_mode.png b/Data/system/app_icon_i2c_dark_mode.png deleted file mode 100644 index f166837e4..000000000 Binary files a/Data/system/app_icon_i2c_dark_mode.png and /dev/null differ diff --git a/Data/system/app_icon_notes_dark_mode.png b/Data/system/app_icon_notes_dark_mode.png deleted file mode 100644 index 628c4a3af..000000000 Binary files a/Data/system/app_icon_notes_dark_mode.png and /dev/null differ diff --git a/Data/system/app_icon_power_settings_dark_mode.png b/Data/system/app_icon_power_settings_dark_mode.png deleted file mode 100644 index b8a2c4d7c..000000000 Binary files a/Data/system/app_icon_power_settings_dark_mode.png and /dev/null differ diff --git a/Data/system/app_icon_settings_dark_mode.png b/Data/system/app_icon_settings_dark_mode.png deleted file mode 100644 index 75c394865..000000000 Binary files a/Data/system/app_icon_settings_dark_mode.png and /dev/null differ diff --git a/Data/system/app_icon_system_info_dark_mode.png b/Data/system/app_icon_system_info_dark_mode.png deleted file mode 100644 index 67f62bbe3..000000000 Binary files a/Data/system/app_icon_system_info_dark_mode.png and /dev/null differ diff --git a/Data/system/app_icon_time_date_settings_dark_mode.png b/Data/system/app_icon_time_date_settings_dark_mode.png deleted file mode 100644 index 21fbc79a3..000000000 Binary files a/Data/system/app_icon_time_date_settings_dark_mode.png and /dev/null differ diff --git a/Documentation/ideas.md b/Documentation/ideas.md index ed7fed5bb..f53ac29ca 100644 --- a/Documentation/ideas.md +++ b/Documentation/ideas.md @@ -2,6 +2,7 @@ ## Before release +- Remove incubating flag from various devices - Add `// SPDX-License-Identifier: GPL-3.0-only` and `// SPDX-License-Identifier: Apache-2.0` to individual files in the project - Elecrow Basic & Advance 3.5" memory issue: not enough memory for App Hub - App Hub crashes if you close it while an app is being installed diff --git a/Modules/lvgl-module/Assets/.gitignore b/Modules/lvgl-module/Assets/.gitignore new file mode 100644 index 000000000..7a87f94db --- /dev/null +++ b/Modules/lvgl-module/Assets/.gitignore @@ -0,0 +1,2 @@ +*.ttf +*.codepoints \ No newline at end of file diff --git a/Modules/lvgl-module/Assets/generate-all.py b/Modules/lvgl-module/Assets/generate-all.py new file mode 100644 index 000000000..ecd3bdba1 --- /dev/null +++ b/Modules/lvgl-module/Assets/generate-all.py @@ -0,0 +1,175 @@ +import os +import urllib.request + +def download_file(url: str, filename: str): + if not os.path.exists(filename): + print(f"Downloading {filename} from {url}") + urllib.request.urlretrieve(url, filename) + else: + print(f"{filename} already exists, skipping download.") + +def generate(bpp, size, font_file: str, symbols: list, output: str): + output_file_name = f"{output}_{size}.c" + output_path = os.path.join("..", "Source", "fonts", output_file_name) + print(f"Generating {output_file_name}") + cmd = "lv_font_conv --no-compress --no-prefilter --bpp {} --size {} --font {} -r {} --format lvgl -o {} --force-fast-kern-format".format(bpp, size, font_file, ",".join(symbols), output_path) + os.system(cmd) + +def read_code_points_map(file_path: str): + codepoints = {} + with open(file_path, 'r') as f: + for line in f: + parts = line.strip().split() + if len(parts) >= 2: + name, cp = parts[0].lower(), parts[1] + codepoints[name] = cp + if len(codepoints) == 0: + raise ValueError(f"Code points map is empty or wasn't found at {file_path}") + return codepoints + + +def get_code_points(codepoints, names: list) -> list: + result = [] + for name in names: + safe_name = name.lower() + if not safe_name in codepoints: + raise ValueError(f"Code point '{safe_name}' not found in map") + result.append(f"0x{codepoints[safe_name].upper()}") + return result + +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): + print(f"Generating {filename}") + output_path = os.path.join("..", "Include", "tactility", filename) + with open(output_path, 'w') as f: + f.write("#pragma once\n\n") + for name in codepoint_names: + safe_name = name.lower() + if safe_name in codepoint_map: + hex_val = codepoint_map[safe_name] + # Convert hex to int + val = int(hex_val, 16) + # Convert to UTF-8 escaped string + 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') + else: + print(f"Warning: {safe_name} not found in codepoint map") + +# --------------- Symbol Fonts --------------- + +shared_symbol_code_point_names = [ + "add", + "apps", + "area_chart", # System Info + "app_registration", # App Settings app + "calendar_month", + "cable", + "circle", + "close", + "cloud", # Web server + "check", + "delete", + "devices", # Developer app + "display_settings", # Display Settings app + "edit_note", + "electric_bolt", # Power (settings) app + "folder", + "deployed_code", # 3D cube + "download", + "forum", # Chat app + "gamepad", + "help", # Diceware help + "hub", # App Hub + "image", # Screenshot app + "keyboard_arrow_up", + "lightbulb", + "language", # Globe + "lists", # Chat app toolbar + "mail", + "menu", + "mop", + "more_vert", + "music_note", + "note_add", + "power_settings_new", # Power off for T-Lora Pager + "refresh", # e.g. App Hub reload button + "search", + "settings", + "toolbar", # Apps without custom icon + "navigation", # GPS (settings) app + "keyboard_alt", # Keyboard (settings) app + "usb", # Power (settings) app + "wifi", # WiFi (settings) app +] + +statusbar_symbol_code_point_names = [ + # Location tracking + "location_on", + # Development server + "cloud", + # SD Card + "sd_card", + "sd_card_alert", + # Wi-Fi + "signal_wifi_0_bar", + "network_wifi_1_bar", + "network_wifi_2_bar", + "network_wifi_3_bar", + "signal_wifi_4_bar", + "signal_wifi_off", + # Battery + "battery_android_frame_1", + "battery_android_frame_2", + "battery_android_frame_3", + "battery_android_frame_4", + "battery_android_frame_5", + "battery_android_frame_6", + "battery_android_frame_bolt" +] + +launcher_symbol_code_point_names = [ + "apps", + "folder", + "settings" +] +shared_symbol_font_sizes = [ + 16 # Fits with montserrat 14 in lv_list as icon with text +] + +# Resolve file path relative to this script so it can be executed from any CWD +base_dir = os.path.dirname(__file__) +if base_dir: + os.chdir(base_dir) + +codepoints_url = "https://github.com/google/material-design-icons/raw/refs/heads/master/variablefont/MaterialSymbolsRounded%5BFILL,GRAD,opsz,wght%5D.codepoints" +ttf_url = "https://github.com/google/material-design-icons/raw/refs/heads/master/variablefont/MaterialSymbolsRounded%5BFILL,GRAD,opsz,wght%5D.ttf" + +codepoints_filename = "MaterialSymbolsRounded.codepoints" +ttf_filename = "MaterialSymbolsRounded.ttf" + +download_file(codepoints_url, codepoints_filename) +download_file(ttf_url, ttf_filename) + +codepoints_map_path = codepoints_filename +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_font_sizes, shared_symbol_code_points, "material_symbols_shared") +generate_icon_names(codepoints_map, shared_symbol_code_point_names, "lvgl_symbols_shared.h") + +# Statusbar symbols +statusbar_symbol_code_points = get_code_points(codepoints_map, statusbar_symbol_code_point_names) +generate_icon_fonts(ttf_filename, [20], statusbar_symbol_code_points, "material_symbols_statusbar") +generate_icon_names(codepoints_map, statusbar_symbol_code_point_names, "lvgl_symbols_statusbar.h") + +# Launcher symbols +launcher_symbol_code_points = get_code_points(codepoints_map, launcher_symbol_code_point_names) +generate_icon_fonts(ttf_filename, [36], launcher_symbol_code_points, "material_symbols_launcher") +generate_icon_names(codepoints_map, launcher_symbol_code_point_names, "lvgl_symbols_launcher.h") + diff --git a/Modules/lvgl-module/CMakeLists.txt b/Modules/lvgl-module/CMakeLists.txt index d259d1277..b60f4908a 100644 --- a/Modules/lvgl-module/CMakeLists.txt +++ b/Modules/lvgl-module/CMakeLists.txt @@ -20,3 +20,7 @@ tactility_add_module(lvgl-module INCLUDE_DIRS Include/ REQUIRES ${REQUIRES_LIST} ) + +tactility_get_module_name("lvgl-module" MODULE_NAME) + +target_compile_definitions(${MODULE_NAME} PUBLIC "-DLV_LVGL_H_INCLUDE_SIMPLE") diff --git a/Modules/lvgl-module/Include/tactility/lvgl_fonts.h b/Modules/lvgl-module/Include/tactility/lvgl_fonts.h new file mode 100644 index 000000000..6874dcbda --- /dev/null +++ b/Modules/lvgl-module/Include/tactility/lvgl_fonts.h @@ -0,0 +1,31 @@ +#pragma once + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +extern const lv_font_t material_symbols_statusbar_20; + +extern const lv_font_t material_symbols_shared_16; + +extern const lv_font_t material_symbols_launcher_36; + +//#define lvgl_get_text_font_smaller() &lv_font_montserrat_12 +// TODO: Make function so it's easier to use this cross-platform +#define LVGL_TEXT_FONT_DEFAULT &lv_font_montserrat_14 +#define LVGL_TEXT_FONT_LARGER &lv_font_montserrat_18 + +// TODO: Make function so it's easier to use this cross-platform +#define LVGL_SYMBOL_FONT_DEFAULT &material_symbols_shared_16 + +#define LVGL_SYMBOL_FONT_LAUNCHER &material_symbols_launcher_36 + +// TODO: Make function so it's easier to use this cross-platform +#define LVGL_TOPBAR_FONT &material_symbols_statusbar_20 +#define LVGL_TOPBAR_ICON_HEIGHT 20 + +#ifdef __cplusplus +} +#endif diff --git a/Modules/lvgl-module/Include/tactility/lvgl_module.h b/Modules/lvgl-module/Include/tactility/lvgl_module.h index e18e3a530..381aaa52f 100644 --- a/Modules/lvgl-module/Include/tactility/lvgl_module.h +++ b/Modules/lvgl-module/Include/tactility/lvgl_module.h @@ -84,7 +84,7 @@ void lvgl_unlock(void); * * @return true if running, false otherwise. */ -bool lvgl_is_running(); +bool lvgl_is_running(void); #ifdef __cplusplus } diff --git a/Modules/lvgl-module/Include/tactility/lvgl_symbols_launcher.h b/Modules/lvgl-module/Include/tactility/lvgl_symbols_launcher.h new file mode 100644 index 000000000..686ac2c2a --- /dev/null +++ b/Modules/lvgl-module/Include/tactility/lvgl_symbols_launcher.h @@ -0,0 +1,5 @@ +#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 new file mode 100644 index 000000000..cac48dfc7 --- /dev/null +++ b/Modules/lvgl-module/Include/tactility/lvgl_symbols_shared.h @@ -0,0 +1,44 @@ +#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 new file mode 100644 index 000000000..d062faea8 --- /dev/null +++ b/Modules/lvgl-module/Include/tactility/lvgl_symbols_statusbar.h @@ -0,0 +1,19 @@ +#pragma once + +#define LVGL_SYMBOL_LOCATION_ON "\xEF\x87\x9B" +#define LVGL_SYMBOL_CLOUD "\xEF\x85\x9C" +#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_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_BOLT "\xEF\x89\x90" diff --git a/Modules/lvgl-module/Source/fonts/material_symbols_launcher_36.c b/Modules/lvgl-module/Source/fonts/material_symbols_launcher_36.c new file mode 100644 index 000000000..bee625475 --- /dev/null +++ b/Modules/lvgl-module/Source/fonts/material_symbols_launcher_36.c @@ -0,0 +1,194 @@ +/******************************************************************************* + * Size: 36 px + * Bpp: 2 + * Opts: --no-compress --no-prefilter --bpp 2 --size 36 --font MaterialSymbolsRounded.ttf -r 0xE5C3,0xE2C7,0xE8B8 --format lvgl -o ../Source/fonts/material_symbols_launcher_36.c --force-fast-kern-format + ******************************************************************************/ + +#ifdef LV_LVGL_H_INCLUDE_SIMPLE +#include "lvgl.h" +#else +#include "lvgl/lvgl.h" +#endif + +#ifndef MATERIAL_SYMBOLS_LAUNCHER_36 +#define MATERIAL_SYMBOLS_LAUNCHER_36 1 +#endif + +#if MATERIAL_SYMBOLS_LAUNCHER_36 + +/*----------------- + * BITMAPS + *----------------*/ + +/*Store the image of the glyphs*/ +static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = { + /* U+E2C7 "" */ + 0x2f, 0xff, 0xff, 0x40, 0x0, 0x0, 0x0, 0xb, + 0xff, 0xff, 0xfe, 0x0, 0x0, 0x0, 0x0, 0xff, + 0xff, 0xff, 0xf8,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xf8, 0x3f, 0x83, 0xf4, 0x0, 0x0, 0x0, + 0x0, 0x1, 0xfc, 0x3f, 0x40, 0x0, 0xbf, 0xe0, + 0x0, 0xf, 0xc3, 0xfe, 0x0, 0x3f, 0xff, 0xc0, + 0x7, 0xfc, 0xf, 0xfc, 0xb, 0xff, 0xfe, 0x2, + 0xff, 0x0, 0x2f, 0xc0, 0xff, 0xff, 0xf0, 0x3f, + 0xc0, 0x0, 0xfc, 0xf, 0xff, 0xff, 0x43, 0xf4, + 0x0, 0xf, 0xc0, 0xff, 0xff, 0xf4, 0x3f, 0x0, + 0x2, 0xfc, 0xf, 0xff, 0xff, 0x3, 0xf8, 0x0, + 0xff, 0x80, 0xbf, 0xff, 0xe0, 0x2f, 0xf0, 0x3f, + 0xd0, 0x3, 0xff, 0xfc, 0x0, 0x7f, 0xc3, 0xf4, + 0x0, 0xb, 0xfe, 0x0, 0x0, 0xfc, 0x3f, 0x40, + 0x0, 0x0, 0x0, 0x0, 0x1f, 0xc2, 0xfc, 0x2f, + 0x0, 0x0, 0xf, 0x83, 0xf8, 0xf, 0xff, 0xfe, + 0x0, 0xb, 0xff, 0xff, 0x0, 0x7f, 0xff, 0xfc, + 0x3, 0xff, 0xff, 0xd0, 0x2, 0xfe, 0x7f, 0xc0, + 0x3f, 0xdb, 0xf8, 0x0, 0x5, 0x0, 0xbd, 0x7, + 0xe0, 0x4, 0x0, 0x0, 0x0, 0xb, 0xd0, 0x7e, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f, 0xff, 0xd0, + 0x0, 0x0, 0x0, 0x0, 0x3, 0xff, 0xfc, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x1f, 0xff, 0x40, 0x0, + 0x0 +}; + + +/*--------------------- + * GLYPH DESCRIPTION + *--------------------*/ + +static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { + {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */, + {.bitmap_index = 0, .adv_w = 576, .box_w = 30, .box_h = 24, .ofs_x = 3, .ofs_y = 6}, + {.bitmap_index = 180, .adv_w = 576, .box_w = 24, .box_h = 24, .ofs_x = 6, .ofs_y = 6}, + {.bitmap_index = 324, .adv_w = 576, .box_w = 30, .box_h = 30, .ofs_x = 3, .ofs_y = 3} +}; + +/*--------------------- + * CHARACTER MAPPING + *--------------------*/ + +static const uint16_t unicode_list_0[] = { + 0x0, 0x2fc, 0x5f1 +}; + +/*Collect the unicode lists and glyph_id offsets*/ +static const lv_font_fmt_txt_cmap_t cmaps[] = +{ + { + .range_start = 58055, .range_length = 1522, .glyph_id_start = 1, + .unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 3, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY + } +}; + + + +/*-------------------- + * ALL CUSTOM DATA + *--------------------*/ + +#if LVGL_VERSION_MAJOR == 8 +/*Store all the custom data of the font*/ +static lv_font_fmt_txt_glyph_cache_t cache; +#endif + +#if LVGL_VERSION_MAJOR >= 8 +static const lv_font_fmt_txt_dsc_t font_dsc = { +#else +static lv_font_fmt_txt_dsc_t font_dsc = { +#endif + .glyph_bitmap = glyph_bitmap, + .glyph_dsc = glyph_dsc, + .cmaps = cmaps, + .kern_dsc = NULL, + .kern_scale = 0, + .cmap_num = 1, + .bpp = 2, + .kern_classes = 0, + .bitmap_format = 0, +#if LVGL_VERSION_MAJOR == 8 + .cache = &cache +#endif +}; + + + +/*----------------- + * PUBLIC FONT + *----------------*/ + +/*Initialize a public general font descriptor*/ +#if LVGL_VERSION_MAJOR >= 8 +const lv_font_t material_symbols_launcher_36 = { +#else +lv_font_t material_symbols_launcher_36 = { +#endif + .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/ + .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ + .line_height = 30, /*The maximum line height required by the font*/ + .base_line = -3, /*Baseline measured from the bottom of the line*/ +#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0) + .subpx = LV_FONT_SUBPX_NONE, +#endif +#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8 + .underline_position = 0, + .underline_thickness = 0, +#endif + .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ +#if LV_VERSION_CHECK(8, 2, 0) || LVGL_VERSION_MAJOR >= 9 + .fallback = NULL, +#endif + .user_data = NULL, +}; + + + +#endif /*#if MATERIAL_SYMBOLS_LAUNCHER_36*/ + diff --git a/Modules/lvgl-module/Source/fonts/material_symbols_shared_16.c b/Modules/lvgl-module/Source/fonts/material_symbols_shared_16.c new file mode 100644 index 000000000..36b521c0b --- /dev/null +++ b/Modules/lvgl-module/Source/fonts/material_symbols_shared_16.c @@ -0,0 +1,473 @@ +/******************************************************************************* + * Size: 16 px + * Bpp: 2 + * Opts: --no-compress --no-prefilter --bpp 2 --size 16 --font MaterialSymbolsRounded.ttf -r 0xE145,0xE5C3,0xE770,0xEF40,0xEBCC,0xEFE6,0xEF4A,0xE5CD,0xF15C,0xE5CA,0xE92E,0xE326,0xEB97,0xE745,0xEC1C,0xE2C7,0xF720,0xF090,0xE8AF,0xE30F,0xE8FD,0xE9F4,0xE3F4,0xE316,0xE90F,0xE894,0xE9B9,0xE159,0xE5D2,0xE28D,0xE5D4,0xE405,0xE89C,0xF8C7,0xE5D5,0xE8B6,0xE8B8,0xE9F7,0xE55D,0xF028,0xE1E0,0xE63E --format lvgl -o ../Source/fonts/material_symbols_shared_16.c --force-fast-kern-format + ******************************************************************************/ + +#ifdef LV_LVGL_H_INCLUDE_SIMPLE +#include "lvgl.h" +#else +#include "lvgl/lvgl.h" +#endif + +#ifndef MATERIAL_SYMBOLS_SHARED_16 +#define MATERIAL_SYMBOLS_SHARED_16 1 +#endif + +#if MATERIAL_SYMBOLS_SHARED_16 + +/*----------------- + * BITMAPS + *----------------*/ + +/*Store the image of the glyphs*/ +static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = { + /* U+E145 "" */ + 0x0, 0x0, 0x0, 0xe, 0x0, 0x0, 0xe0, 0x0, + 0xe, 0x0, 0x15, 0xf5, 0x4b, 0xff, 0xfd, 0x0, + 0xe0, 0x0, 0xe, 0x0, 0x0, 0xe0, 0x0, 0x9, + 0x0, + + /* U+E159 "" */ + 0x15, 0x55, 0x55, 0xb, 0xff, 0xff, 0xfd, 0xf4, + 0x0, 0x2, 0xde, 0xe0, 0x1, 0xed, 0xd2, 0xd0, + 0xf4, 0xdd, 0x7, 0xf8, 0xd, 0xd0, 0x4, 0x0, + 0xdd, 0x0, 0x0, 0xd, 0xd0, 0x0, 0x0, 0xdd, + 0x0, 0x0, 0xd, 0xbf, 0xff, 0xff, 0xd1, 0x55, + 0x55, 0x50, + + /* U+E1E0 "" */ + 0x0, 0x0, 0x0, 0xe, 0x0, 0x2, 0xf0, 0x0, + 0xe, 0x0, 0x10, 0xd1, 0x5b, 0xcd, 0x3e, 0x78, + 0xd3, 0xe3, 0x4d, 0x1c, 0x39, 0xe6, 0xc2, 0xff, + 0xf4, 0x0, 0xd0, 0x0, 0xe, 0x0, 0x1, 0xf0, + 0x0, 0xe, 0x0, + + /* U+E28D "" */ + 0x0, 0x0, 0x0, 0x0, 0x0, 0xb, 0xe0, 0x0, + 0x0, 0xd, 0x70, 0x0, 0x0, 0xd, 0x70, 0x0, + 0x0, 0xd, 0x70, 0x0, 0x0, 0xd, 0x70, 0x0, + 0x0, 0xd, 0x70, 0x0, 0x6, 0xaf, 0xfa, 0x90, + 0xf, 0xaa, 0xaa, 0xf0, 0xd, 0x0, 0x0, 0x70, + 0xf, 0xff, 0xff, 0xf0, 0x1d, 0x55, 0x55, 0x74, + 0x28, 0xc2, 0x83, 0x28, 0x34, 0xd2, 0x87, 0x1c, + 0x3f, 0xff, 0xff, 0xfc, 0x5, 0x55, 0x55, 0x50, + + /* U+E2C7 "" */ + 0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xbf, 0xff, 0xfe, + + /* U+E405 "" */ + 0x0, 0xff, 0x0, 0xff, 0x0, 0xfa, 0x0, 0xd0, + 0x0, 0xd0, 0x0, 0xd0, 0x4, 0xd0, 0x3f, 0xd0, + 0xff, 0xd0, 0xff, 0xd0, 0xbf, 0xc0, 0x2f, 0x0, + + /* U+E55D "" */ + 0x0, 0x14, 0x0, 0x0, 0x3c, 0x0, 0x0, 0x7d, + 0x0, 0x0, 0xeb, 0x0, 0x1, 0xc3, 0x40, 0x2, + 0x82, 0x80, 0x3, 0x41, 0xc0, 0xb, 0x0, 0xe0, + 0xd, 0x14, 0x70, 0x2d, 0xff, 0x78, 0x3f, 0x82, + 0xfc, 0x34, 0x0, 0x1c, + + /* U+E5C3 "" */ + 0x14, 0x14, 0x14, 0x3d, 0x3d, 0x3d, 0x3c, 0x3c, + 0x3c, 0x0, 0x0, 0x0, 0x14, 0x14, 0x14, 0x3d, + 0x3d, 0x3d, 0x3c, 0x3c, 0x3c, 0x0, 0x0, 0x0, + 0x14, 0x14, 0x14, 0x3d, 0x3d, 0x3d, 0x3c, 0x3c, + 0x3c, 0x0, 0x0, 0x0, + + /* U+E5CA "" */ + 0x0, 0x0, 0x8, 0x0, 0x0, 0x3c, 0x0, 0x0, + 0xf0, 0x10, 0x3, 0xc0, 0x38, 0xf, 0x0, 0xe, + 0x3c, 0x0, 0x3, 0xf0, 0x0, 0x0, 0x80, 0x0, + + /* U+E5CD "" */ + 0x20, 0x0, 0x43, 0xc0, 0x1d, 0xf, 0x7, 0x40, + 0x3e, 0xd0, 0x0, 0xf4, 0x0, 0x1f, 0xc0, 0x7, + 0x4f, 0x1, 0xd0, 0x3c, 0x34, 0x0, 0xd0, 0x0, + 0x0, + + /* U+E5D2 "" */ + 0xff, 0xff, 0xff, 0x15, 0x55, 0x54, 0x0, 0x0, + 0x0, 0x55, 0x55, 0x55, 0xff, 0xff, 0xfe, 0x0, + 0x0, 0x0, 0x15, 0x55, 0x54, 0xff, 0xff, 0xff, + + /* U+E5D4 "" */ + 0x14, 0x3d, 0x3c, 0x0, 0x14, 0x3d, 0x3c, 0x0, + 0x14, 0x3d, 0x3c, 0x0, + + /* U+E5D5 "" */ + 0x0, 0x14, 0x0, 0x2, 0xff, 0x8d, 0xf, 0x41, + 0xfd, 0x2c, 0x0, 0x3d, 0x34, 0x3, 0xfd, 0x70, + 0x1, 0x54, 0x70, 0x0, 0x0, 0x34, 0x0, 0x4, + 0x2c, 0x0, 0x38, 0xf, 0x41, 0xf0, 0x2, 0xff, + 0x80, 0x0, 0x14, 0x0, + + /* U+E63E "" */ + 0x0, 0x0, 0x0, 0x0, 0x1, 0xbf, 0xfe, 0x0, + 0xf, 0xff, 0xff, 0xe0, 0x7f, 0x40, 0x6, 0xfc, + 0xb8, 0x0, 0x0, 0x3d, 0x0, 0x7f, 0xf8, 0x0, + 0x2, 0xff, 0xff, 0x40, 0x2, 0xd0, 0xb, 0x40, + 0x0, 0x1, 0x0, 0x0, 0x0, 0xb, 0xc0, 0x0, + 0x0, 0xf, 0xd0, 0x0, 0x0, 0x7, 0xc0, 0x0, + + /* U+E745 "" */ + 0x15, 0x55, 0x0, 0xf, 0xff, 0xc0, 0x0, 0x0, + 0x0, 0x0, 0x55, 0x54, 0x0, 0x3f, 0xff, 0x0, + 0x0, 0x0, 0x1, 0x43, 0xfd, 0x1, 0xf8, 0x55, + 0x1, 0xfe, 0x0, 0x1, 0xce, 0x0, 0x0, 0xce, + 0x0, 0x0, 0x3e, 0x0, 0x0, 0x0, 0x0, + + /* U+E770 "" */ + 0x0, 0x4, 0x0, 0x0, 0x3f, 0x0, 0x0, 0xf3, + 0xd4, 0x82, 0xc0, 0xbf, 0xfb, 0x40, 0x7, 0xee, + 0x0, 0x7, 0xd0, 0x2c, 0x7, 0xd0, 0x7f, 0x47, + 0xf4, 0xff, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x55, 0x55, 0x55, + + /* U+E894 "" */ + 0x0, 0x15, 0x0, 0x0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4, + 0x35, 0xc1, 0x2, 0xff, 0xf, 0xf8, 0x35, 0x40, + 0x15, 0xc3, 0x81, 0xf4, 0x2c, 0x1d, 0x3f, 0xc7, + 0x40, 0xd3, 0xfd, 0x70, 0x3c, 0x3f, 0xc3, 0xc7, + 0x0, 0x50, 0xd, 0x3f, 0xd0, 0x7f, 0xc0, 0xeb, + 0xe, 0xb0, 0x0, 0x3a, 0xc0, 0x0, 0x2, 0xf8, + 0x0, + + /* U+E8FD "" */ + 0x0, 0x15, 0x40, 0x0, 0x2f, 0xff, 0x40, 0xb, + 0x40, 0x2e, 0x2, 0xc1, 0xa4, 0x74, 0x34, 0x20, + 0xc1, 0xcb, 0x0, 0x1c, 0xd, 0xa0, 0x3, 0x40, + 0xea, 0x0, 0xa0, 0xe, 0xa0, 0x0, 0x0, 0xd7, + 0x0, 0x90, 0x1c, 0x38, 0xe, 0x3, 0x80, 0xe0, + 0x0, 0xf0, 0x3, 0xea, 0xbc, 0x0, 0x6, 0xf9, + 0x0, + + /* U+E90F "" */ + 0x0, 0x50, 0x0, 0xff, 0xf0, 0x3c, 0x3, 0xcb, + 0x0, 0xe, 0xd0, 0x0, 0x7d, 0x0, 0x7, 0xd0, + 0x0, 0x7b, 0x0, 0xe, 0x39, 0x57, 0xc0, 0xff, + 0xf0, 0x1, 0x54, 0x0, 0xbf, 0xd0, 0x0, 0x50, + 0x0, 0xe, 0x0, + + /* U+E92E "" */ + 0x15, 0xff, 0x54, 0x3f, 0xff, 0xfd, 0x28, 0x0, + 0x28, 0x28, 0x82, 0x28, 0x28, 0xd7, 0x28, 0x28, + 0xd7, 0x28, 0x28, 0xd7, 0x28, 0x28, 0xd7, 0x28, + 0x28, 0xd7, 0x28, 0x28, 0x0, 0x28, 0x2d, 0x55, + 0x68, 0x1f, 0xff, 0xf4, + + /* U+E9B9 "" */ + 0x10, 0x1a, 0xaa, 0x4b, 0xcb, 0xff, 0xfd, 0x78, + 0x7f, 0xff, 0xd0, 0x0, 0x0, 0x0,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0, 0xbe, 0x28, 0x34, + 0xff, 0x28, 0x34, 0xff, 0x28, 0x34, 0xbe, 0x28, + 0x34, 0x28, 0x28, 0x34, 0x28, 0xbe, 0x34, 0x28, + 0xff, 0x34, 0x28, 0xff, 0x38, 0x28, 0xbe, 0x2d, + 0xb4, 0x3c, 0xb, 0xd0, + + /* U+F028 "" */ + 0x5, 0x55, 0x55, 0x50, 0x3f, 0xff, 0xff, 0xfc, + 0x70, 0x0, 0x0, 0xd, 0x71, 0x48, 0x11, 0x4d, + 0x71, 0x48, 0x21, 0x4d, 0x70, 0x0, 0x0, 0xd, + 0x72, 0x8c, 0x72, 0x8d, 0x70, 0x0, 0x0, 0xd, + 0x70, 0x2f, 0xf8, 0xd, 0x70, 0x5, 0x50, 0xd, + 0x3f, 0xff, 0xff, 0xfc, 0x5, 0x55, 0x55, 0x50, + + /* U+F090 "" */ + 0x0, 0x0, 0x0, 0x0, 0x34, 0x0, 0x0, 0x34, + 0x0, 0x0, 0x34, 0x0, 0x0, 0x34, 0x0, 0x3, + 0xbb, 0x80, 0x1, 0xff, 0x0, 0x0, 0xbc, 0x0, + 0x30, 0x10, 0xc, 0x70, 0x0, 0xd, 0x3f, 0xff, + 0xfc, 0x5, 0x55, 0x50, + + /* U+F15C "" */ + 0x0, 0x1, 0x40, 0x0, 0x0, 0x2f, 0xf4, 0x0, + 0x0, 0xb4, 0x2d, 0x0, 0x1, 0xc0, 0xb, 0x0, + 0x7, 0xc0, 0x3, 0x40, 0x2e, 0x0, 0x3, 0xd0, + 0x34, 0x0, 0x2, 0xb8, 0x70, 0x0, 0x0, 0x1c, + 0x30, 0x0, 0x0, 0xd, 0x3c, 0x0, 0x0, 0x2c, + 0xf, 0xff, 0xff, 0xf4, 0x0, 0x55, 0x55, 0x40, + + /* U+F720 "" */ + 0x0, 0x10, 0x0, 0x1, 0xfe, 0x0, 0xb, 0x87, + 0xd0, 0x7c, 0x0, 0xbc, 0xf8, 0x0, 0x3e, 0xef, + 0x42, 0xee, 0xd2, 0xff, 0x4e, 0xd0, 0x38, 0xe, + 0xd0, 0x34, 0xe, 0xd0, 0x34, 0xe, 0xb4, 0x34, + 0x2d, 0x2f, 0x36, 0xf0, 0x2, 0xff, 0x40, 0x0, + 0x78, 0x0, + + /* U+F8C7 "" */ + 0x0, 0x4, 0x0, 0x0, 0x0, 0xd0, 0x0, 0x0, + 0xd, 0x0, 0x2, 0xc0, 0xd0, 0x70, 0x34, 0xd, + 0x3, 0x8b, 0x0, 0xd0, 0x1c, 0xa0, 0xd, 0x0, + 0xca, 0x0, 0x80, 0xc, 0xa0, 0x0, 0x0, 0xc7, + 0x0, 0x0, 0x2c, 0x38, 0x0, 0x3, 0x40, 0xe0, + 0x1, 0xe0, 0x3, 0xea, 0xf8, 0x0, 0x6, 0xf8, + 0x0 +}; + + +/*--------------------- + * GLYPH DESCRIPTION + *--------------------*/ + +static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { + {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */, + {.bitmap_index = 0, .adv_w = 256, .box_w = 10, .box_h = 10, .ofs_x = 3, .ofs_y = 3}, + {.bitmap_index = 25, .adv_w = 256, .box_w = 14, .box_h = 12, .ofs_x = 1, .ofs_y = 2}, + {.bitmap_index = 67, .adv_w = 256, .box_w = 10, .box_h = 14, .ofs_x = 3, .ofs_y = 1}, + {.bitmap_index = 102, .adv_w = 256, .box_w = 16, .box_h = 16, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 166, .adv_w = 256, .box_w = 14, .box_h = 12, .ofs_x = 1, .ofs_y = 2}, + {.bitmap_index = 208, .adv_w = 256, .box_w = 14, .box_h = 14, .ofs_x = 1, .ofs_y = 1}, + {.bitmap_index = 257, .adv_w = 256, .box_w = 8, .box_h = 5, .ofs_x = 4, .ofs_y = 6}, + {.bitmap_index = 267, .adv_w = 256, .box_w = 14, .box_h = 12, .ofs_x = 1, .ofs_y = 2}, + {.bitmap_index = 309, .adv_w = 256, .box_w = 12, .box_h = 12, .ofs_x = 2, .ofs_y = 2}, + {.bitmap_index = 345, .adv_w = 256, .box_w = 8, .box_h = 12, .ofs_x = 4, .ofs_y = 2}, + {.bitmap_index = 369, .adv_w = 256, .box_w = 12, .box_h = 12, .ofs_x = 2, .ofs_y = 2}, + {.bitmap_index = 405, .adv_w = 256, .box_w = 12, .box_h = 12, .ofs_x = 2, .ofs_y = 2}, + {.bitmap_index = 441, .adv_w = 256, .box_w = 12, .box_h = 8, .ofs_x = 2, .ofs_y = 4}, + {.bitmap_index = 465, .adv_w = 256, .box_w = 10, .box_h = 10, .ofs_x = 3, .ofs_y = 3}, + {.bitmap_index = 490, .adv_w = 256, .box_w = 12, .box_h = 8, .ofs_x = 2, .ofs_y = 4}, + {.bitmap_index = 514, .adv_w = 256, .box_w = 4, .box_h = 12, .ofs_x = 6, .ofs_y = 2}, + {.bitmap_index = 526, .adv_w = 256, .box_w = 12, .box_h = 12, .ofs_x = 2, .ofs_y = 2}, + {.bitmap_index = 562, .adv_w = 256, .box_w = 16, .box_h = 12, .ofs_x = 0, .ofs_y = 2}, + {.bitmap_index = 610, .adv_w = 256, .box_w = 13, .box_h = 12, .ofs_x = 2, .ofs_y = 2}, + {.bitmap_index = 649, .adv_w = 256, .box_w = 12, .box_h = 12, .ofs_x = 2, .ofs_y = 2}, + {.bitmap_index = 685, .adv_w = 256, .box_w = 14, .box_h = 14, .ofs_x = 1, .ofs_y = 1}, + {.bitmap_index = 734, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 1}, + {.bitmap_index = 776, .adv_w = 256, .box_w = 14, .box_h = 13, .ofs_x = 1, .ofs_y = 2}, + {.bitmap_index = 822, .adv_w = 256, .box_w = 12, .box_h = 12, .ofs_x = 2, .ofs_y = 2}, + {.bitmap_index = 858, .adv_w = 256, .box_w = 14, .box_h = 14, .ofs_x = 1, .ofs_y = 1}, + {.bitmap_index = 907, .adv_w = 256, .box_w = 14, .box_h = 14, .ofs_x = 1, .ofs_y = 1}, + {.bitmap_index = 956, .adv_w = 256, .box_w = 10, .box_h = 14, .ofs_x = 3, .ofs_y = 1}, + {.bitmap_index = 991, .adv_w = 256, .box_w = 12, .box_h = 12, .ofs_x = 2, .ofs_y = 2}, + {.bitmap_index = 1027, .adv_w = 256, .box_w = 14, .box_h = 12, .ofs_x = 1, .ofs_y = 2}, + {.bitmap_index = 1069, .adv_w = 256, .box_w = 16, .box_h = 16, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 1133, .adv_w = 256, .box_w = 12, .box_h = 12, .ofs_x = 2, .ofs_y = 2}, + {.bitmap_index = 1169, .adv_w = 256, .box_w = 14, .box_h = 13, .ofs_x = 1, .ofs_y = 1}, + {.bitmap_index = 1215, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 1}, + {.bitmap_index = 1257, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 1}, + {.bitmap_index = 1299, .adv_w = 256, .box_w = 13, .box_h = 12, .ofs_x = 2, .ofs_y = 2}, + {.bitmap_index = 1338, .adv_w = 256, .box_w = 14, .box_h = 14, .ofs_x = 1, .ofs_y = 1}, + {.bitmap_index = 1387, .adv_w = 256, .box_w = 12, .box_h = 12, .ofs_x = 2, .ofs_y = 2}, + {.bitmap_index = 1423, .adv_w = 256, .box_w = 16, .box_h = 12, .ofs_x = 0, .ofs_y = 2}, + {.bitmap_index = 1471, .adv_w = 256, .box_w = 12, .box_h = 12, .ofs_x = 2, .ofs_y = 2}, + {.bitmap_index = 1507, .adv_w = 256, .box_w = 16, .box_h = 12, .ofs_x = 0, .ofs_y = 2}, + {.bitmap_index = 1555, .adv_w = 256, .box_w = 12, .box_h = 14, .ofs_x = 2, .ofs_y = 1}, + {.bitmap_index = 1597, .adv_w = 256, .box_w = 14, .box_h = 14, .ofs_x = 1, .ofs_y = 1} +}; + +/*--------------------- + * CHARACTER MAPPING + *--------------------*/ + +static const uint16_t unicode_list_0[] = { + 0x0, 0x14, 0x9b, 0x148, 0x182, 0x1ca, 0x1d1, 0x1e1, + 0x2af, 0x2c0, 0x418, 0x47e, 0x485, 0x488, 0x48d, 0x48f, + 0x490, 0x4f9, 0x600, 0x62b, 0x74f, 0x757, 0x76a, 0x771, + 0x773, 0x7b8, 0x7ca, 0x7e9, 0x874, 0x8af, 0x8b2, 0xa52, + 0xa87, 0xad7, 0xdfb, 0xe05, 0xea1, 0xee3, 0xf4b, 0x1017, + 0x15db, 0x1782 +}; + +/*Collect the unicode lists and glyph_id offsets*/ +static const lv_font_fmt_txt_cmap_t cmaps[] = +{ + { + .range_start = 57669, .range_length = 6019, .glyph_id_start = 1, + .unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 42, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY + } +}; + + + +/*-------------------- + * ALL CUSTOM DATA + *--------------------*/ + +#if LVGL_VERSION_MAJOR == 8 +/*Store all the custom data of the font*/ +static lv_font_fmt_txt_glyph_cache_t cache; +#endif + +#if LVGL_VERSION_MAJOR >= 8 +static const lv_font_fmt_txt_dsc_t font_dsc = { +#else +static lv_font_fmt_txt_dsc_t font_dsc = { +#endif + .glyph_bitmap = glyph_bitmap, + .glyph_dsc = glyph_dsc, + .cmaps = cmaps, + .kern_dsc = NULL, + .kern_scale = 0, + .cmap_num = 1, + .bpp = 2, + .kern_classes = 0, + .bitmap_format = 0, +#if LVGL_VERSION_MAJOR == 8 + .cache = &cache +#endif +}; + + + +/*----------------- + * PUBLIC FONT + *----------------*/ + +/*Initialize a public general font descriptor*/ +#if LVGL_VERSION_MAJOR >= 8 +const lv_font_t material_symbols_shared_16 = { +#else +lv_font_t material_symbols_shared_16 = { +#endif + .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/ + .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ + .line_height = 16, /*The maximum line height required by the font*/ + .base_line = 0, /*Baseline measured from the bottom of the line*/ +#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0) + .subpx = LV_FONT_SUBPX_NONE, +#endif +#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8 + .underline_position = 0, + .underline_thickness = 0, +#endif + .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ +#if LV_VERSION_CHECK(8, 2, 0) || LVGL_VERSION_MAJOR >= 9 + .fallback = NULL, +#endif + .user_data = NULL, +}; + + + +#endif /*#if MATERIAL_SYMBOLS_SHARED_16*/ + diff --git a/Modules/lvgl-module/Source/fonts/material_symbols_statusbar_20.c b/Modules/lvgl-module/Source/fonts/material_symbols_statusbar_20.c new file mode 100644 index 000000000..0e1360b0b --- /dev/null +++ b/Modules/lvgl-module/Source/fonts/material_symbols_statusbar_20.c @@ -0,0 +1,306 @@ +/******************************************************************************* + * Size: 20 px + * Bpp: 2 + * Opts: --no-compress --no-prefilter --bpp 2 --size 20 --font MaterialSymbolsRounded.ttf -r 0xF1DB,0xF15C,0xE623,0xF057,0xF0B0,0xEBE4,0xEBD6,0xEBE1,0xF065,0xE1DA,0xF257,0xF256,0xF255,0xF254,0xF253,0xF252,0xF250 --format lvgl -o ../Source/fonts/material_symbols_statusbar_20.c --force-fast-kern-format + ******************************************************************************/ + +#ifdef LV_LVGL_H_INCLUDE_SIMPLE +#include "lvgl.h" +#else +#include "lvgl/lvgl.h" +#endif + +#ifndef MATERIAL_SYMBOLS_STATUSBAR_20 +#define MATERIAL_SYMBOLS_STATUSBAR_20 1 +#endif + +#if MATERIAL_SYMBOLS_STATUSBAR_20 + +/*----------------- + * BITMAPS + *----------------*/ + +/*Store the image of the glyphs*/ +static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = { + /* U+E1DA "" */ + 0x34, 0x0, 0x0, 0x0, 0x0, 0x3d, 0x1, 0xaa, + 0x40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3e, 0xaa, + 0xaa, 0x43, 0x0, 0x3f, 0xff, 0xff, 0x0, 0x0, + + /* U+F252 "" */ + 0xf, 0xff, 0xff, 0xff, 0x0, 0x3e, 0xaa, 0xaa, + 0xab, 0xc0, 0x38, 0x6a, 0xaa, 0x42, 0xc0, 0x3a, + 0xff, 0xff, 0xd2, 0xcc, 0x3a, 0xff, 0xff, 0xd2, + 0xcc, 0x3a, 0xff, 0xff, 0xd2, 0xcc, 0x3a, 0xff, + 0xff, 0xd2, 0xcc, 0x38, 0x6a, 0xaa, 0x42, 0xc0, + 0x3e, 0xaa, 0xaa, 0xab, 0xc0, 0xf, 0xff, 0xff, + 0xff, 0x0, + + /* U+F253 "" */ + 0xf, 0xff, 0xff, 0xff, 0x0, 0x3e, 0xaa, 0xaa, + 0xab, 0xc0, 0x38, 0x6a, 0xa4, 0x2, 0xc0, 0x3a, + 0xff, 0xfe, 0x2, 0xcc, 0x3a, 0xff, 0xfe, 0x2, + 0xcc, 0x3a, 0xff, 0xfe, 0x2, 0xcc, 0x3a, 0xff, + 0xfe, 0x2, 0xcc, 0x38, 0x6a, 0xa4, 0x2, 0xc0, + 0x3e, 0xaa, 0xaa, 0xab, 0xc0, 0xf, 0xff, 0xff, + 0xff, 0x0, + + /* U+F254 "" */ + 0xf, 0xff, 0xff, 0xff, 0x0, 0x3e, 0xaa, 0xaa, + 0xab, 0xc0, 0x38, 0x6a, 0x90, 0x2, 0xc0, 0x3a, + 0xff, 0xf0, 0x2, 0xcc, 0x3a, 0xff, 0xf0, 0x2, + 0xcc, 0x3a, 0xff, 0xf0, 0x2, 0xcc, 0x3a, 0xff, + 0xf0, 0x2, 0xcc, 0x38, 0x6a, 0x90, 0x2, 0xc0, + 0x3e, 0xaa, 0xaa, 0xab, 0xc0, 0xf, 0xff, 0xff, + 0xff, 0x0, + + /* U+F255 "" */ + 0xf, 0xff, 0xff, 0xff, 0x0, 0x3e, 0xaa, 0xaa, + 0xab, 0xc0, 0x38, 0x69, 0x0, 0x2, 0xc0, 0x3a, + 0xff, 0x40, 0x2, 0xcc, 0x3a, 0xff, 0x40, 0x2, + 0xcc, 0x3a, 0xff, 0x40, 0x2, 0xcc, 0x3a, 0xff, + 0x40, 0x2, 0xcc, 0x38, 0x69, 0x0, 0x2, 0xc0, + 0x3e, 0xaa, 0xaa, 0xab, 0xc0, 0xf, 0xff, 0xff, + 0xff, 0x0, + + /* U+F256 "" */ + 0xf, 0xff, 0xff, 0xff, 0x0, 0x3e, 0xaa, 0xaa, + 0xab, 0xc0, 0x38, 0x50, 0x0, 0x2, 0xc0, 0x3a, + 0xf8, 0x0, 0x2, 0xcc, 0x3a, 0xf8, 0x0, 0x2, + 0xcc, 0x3a, 0xf8, 0x0, 0x2, 0xcc, 0x3a, 0xf8, + 0x0, 0x2, 0xcc, 0x38, 0x50, 0x0, 0x2, 0xc0, + 0x3e, 0xaa, 0xaa, 0xab, 0xc0, 0xf, 0xff, 0xff, + 0xff, 0x0, + + /* U+F257 "" */ + 0xf, 0xff, 0xff, 0xff, 0x0, 0x3e, 0xaa, 0xaa, + 0xab, 0xc0, 0x38, 0x40, 0x0, 0x2, 0xc0, 0x3a, + 0xc0, 0x0, 0x2, 0xcc, 0x3a, 0xc0, 0x0, 0x2, + 0xcc, 0x3a, 0xc0, 0x0, 0x2, 0xcc, 0x3a, 0xc0, + 0x0, 0x2, 0xcc, 0x38, 0x40, 0x0, 0x2, 0xc0, + 0x3e, 0xaa, 0xaa, 0xab, 0xc0, 0xf, 0xff, 0xff, + 0xff, 0x0 +}; + + +/*--------------------- + * GLYPH DESCRIPTION + *--------------------*/ + +static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { + {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */, + {.bitmap_index = 0, .adv_w = 320, .box_w = 20, .box_h = 18, .ofs_x = 0, .ofs_y = 0}, + {.bitmap_index = 90, .adv_w = 320, .box_w = 14, .box_h = 18, .ofs_x = 3, .ofs_y = 1}, + {.bitmap_index = 153, .adv_w = 320, .box_w = 20, .box_h = 14, .ofs_x = 0, .ofs_y = 3}, + {.bitmap_index = 223, .adv_w = 320, .box_w = 20, .box_h = 14, .ofs_x = 0, .ofs_y = 3}, + {.bitmap_index = 293, .adv_w = 320, .box_w = 20, .box_h = 14, .ofs_x = 0, .ofs_y = 3}, + {.bitmap_index = 363, .adv_w = 320, .box_w = 14, .box_h = 18, .ofs_x = 3, .ofs_y = 1}, + {.bitmap_index = 426, .adv_w = 320, .box_w = 20, .box_h = 14, .ofs_x = 0, .ofs_y = 3}, + {.bitmap_index = 496, .adv_w = 320, .box_w = 20, .box_h = 14, .ofs_x = 0, .ofs_y = 3}, + {.bitmap_index = 566, .adv_w = 320, .box_w = 20, .box_h = 14, .ofs_x = 0, .ofs_y = 3}, + {.bitmap_index = 636, .adv_w = 320, .box_w = 14, .box_h = 17, .ofs_x = 3, .ofs_y = 2}, + {.bitmap_index = 696, .adv_w = 320, .box_w = 19, .box_h = 10, .ofs_x = 0, .ofs_y = 5}, + {.bitmap_index = 744, .adv_w = 320, .box_w = 20, .box_h = 10, .ofs_x = 0, .ofs_y = 5}, + {.bitmap_index = 794, .adv_w = 320, .box_w = 20, .box_h = 10, .ofs_x = 0, .ofs_y = 5}, + {.bitmap_index = 844, .adv_w = 320, .box_w = 20, .box_h = 10, .ofs_x = 0, .ofs_y = 5}, + {.bitmap_index = 894, .adv_w = 320, .box_w = 20, .box_h = 10, .ofs_x = 0, .ofs_y = 5}, + {.bitmap_index = 944, .adv_w = 320, .box_w = 20, .box_h = 10, .ofs_x = 0, .ofs_y = 5}, + {.bitmap_index = 994, .adv_w = 320, .box_w = 20, .box_h = 10, .ofs_x = 0, .ofs_y = 5} +}; + +/*--------------------- + * CHARACTER MAPPING + *--------------------*/ + +static const uint16_t unicode_list_0[] = { + 0x0, 0x449, 0x9fc, 0xa07, 0xa0a, 0xe7d, 0xe8b, 0xed6, + 0xf82, 0x1001, 0x1076, 0x1078, 0x1079, 0x107a, 0x107b, 0x107c, + 0x107d +}; + +/*Collect the unicode lists and glyph_id offsets*/ +static const lv_font_fmt_txt_cmap_t cmaps[] = +{ + { + .range_start = 57818, .range_length = 4222, .glyph_id_start = 1, + .unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 17, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY + } +}; + + + +/*-------------------- + * ALL CUSTOM DATA + *--------------------*/ + +#if LVGL_VERSION_MAJOR == 8 +/*Store all the custom data of the font*/ +static lv_font_fmt_txt_glyph_cache_t cache; +#endif + +#if LVGL_VERSION_MAJOR >= 8 +static const lv_font_fmt_txt_dsc_t font_dsc = { +#else +static lv_font_fmt_txt_dsc_t font_dsc = { +#endif + .glyph_bitmap = glyph_bitmap, + .glyph_dsc = glyph_dsc, + .cmaps = cmaps, + .kern_dsc = NULL, + .kern_scale = 0, + .cmap_num = 1, + .bpp = 2, + .kern_classes = 0, + .bitmap_format = 0, +#if LVGL_VERSION_MAJOR == 8 + .cache = &cache +#endif +}; + + + +/*----------------- + * PUBLIC FONT + *----------------*/ + +/*Initialize a public general font descriptor*/ +#if LVGL_VERSION_MAJOR >= 8 +const lv_font_t material_symbols_statusbar_20 = { +#else +lv_font_t material_symbols_statusbar_20 = { +#endif + .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/ + .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ + .line_height = 19, /*The maximum line height required by the font*/ + .base_line = 0, /*Baseline measured from the bottom of the line*/ +#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0) + .subpx = LV_FONT_SUBPX_NONE, +#endif +#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8 + .underline_position = 0, + .underline_thickness = 0, +#endif + .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ +#if LV_VERSION_CHECK(8, 2, 0) || LVGL_VERSION_MAJOR >= 9 + .fallback = NULL, +#endif + .user_data = NULL, +}; + + + +#endif /*#if MATERIAL_SYMBOLS_STATUSBAR_20*/ + diff --git a/THIRD-PARTY-NOTICES.md b/THIRD-PARTY-NOTICES.md index 8c94fb9e3..8f97c9f98 100644 --- a/THIRD-PARTY-NOTICES.md +++ b/THIRD-PARTY-NOTICES.md @@ -17,9 +17,12 @@ Website: https://github.com/flipperdevices/flipperzero-firmware/ License: [GPL v3.0](https://github.com/flipperdevices/flipperzero-firmware/blob/dev/LICENSE) -### Google Fonts +### Google Fonts & Material Design Icons -Website: https://fonts.google.com/icons +Websites: + +- https://fonts.google.com/icons +- https://github.com/google/material-design-icons License: [Apache License, version 2.0](https://fonts.google.com/attribution) diff --git a/Tactility/Include/Tactility/Assets.h b/Tactility/Include/Tactility/Assets.h index 6e7a865f4..b0ef42eec 100644 --- a/Tactility/Include/Tactility/Assets.h +++ b/Tactility/Include/Tactility/Assets.h @@ -11,17 +11,3 @@ // UI #define TT_ASSETS_UI_SPINNER TT_ASSET("spinner.png") #define TT_ASSETS_UI_CURSOR TT_ASSET("cursor.png") - -// App icons -#define TT_ASSETS_APP_ICON_FALLBACK TT_ASSET("app_icon_fallback_dark_mode.png") -#define TT_ASSETS_APP_ICON_FILES TT_ASSET("app_icon_files_dark_mode.png") -#define TT_ASSETS_APP_ICON_DISPLAY_SETTINGS TT_ASSET("app_icon_display_settings_dark_mode.png") -#define TT_ASSETS_APP_ICON_POWER_SETTINGS TT_ASSET("app_icon_power_settings_dark_mode.png") -#define TT_ASSETS_APP_ICON_I2C_SETTINGS TT_ASSET("app_icon_i2c_dark_mode.png") -#define TT_ASSETS_APP_ICON_SETTINGS TT_ASSET("app_icon_settings_dark_mode.png") -#define TT_ASSETS_APP_ICON_SYSTEM_INFO TT_ASSET("app_icon_system_info_dark_mode.png") -#define TT_ASSETS_APP_ICON_TIME_DATE_SETTINGS TT_ASSET("app_icon_time_date_settings_dark_mode.png") -#define TT_ASSETS_APP_ICON_CALCULATOR TT_ASSET("app_icon_calculator_dark_mode.png") -#define TT_ASSETS_APP_ICON_NOTES TT_ASSET("app_icon_notes_dark_mode.png") -#define TT_ASSETS_APP_ICON_CHAT TT_ASSET("app_icon_chat_dark_mode.png") -#define TT_ASSETS_APP_ICON_GPIO TT_ASSET("app_icon_gpio_dark_mode.png") diff --git a/Tactility/Source/app/addgps/AddGps.cpp b/Tactility/Source/app/addgps/AddGps.cpp index 8bf12e165..783e97855 100644 --- a/Tactility/Source/app/addgps/AddGps.cpp +++ b/Tactility/Source/app/addgps/AddGps.cpp @@ -10,6 +10,7 @@ #include "tactility/drivers/uart_controller.h" #include #include +#include namespace tt::app::addgps { @@ -193,7 +194,7 @@ class AddGpsApp final : public App { extern const AppManifest manifest = { .appId = "AddGps", .appName = "Add GPS", - .appIcon = LV_SYMBOL_GPS, + .appIcon = LVGL_SYMBOL_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 bed3fa2d9..f151986d8 100644 --- a/Tactility/Source/app/apphub/AppHubApp.cpp +++ b/Tactility/Source/app/apphub/AppHubApp.cpp @@ -12,6 +12,7 @@ #include #include +#include #include #include @@ -178,6 +179,7 @@ class AppHubApp final : public App { extern const AppManifest manifest = { .appId = "AppHub", .appName = "App Hub", + .appIcon = LVGL_SYMBOL_HUB, .appCategory = Category::System, .createApp = create, }; diff --git a/Tactility/Source/app/applist/AppList.cpp b/Tactility/Source/app/applist/AppList.cpp index bc7ea7714..8d36d9a32 100644 --- a/Tactility/Source/app/applist/AppList.cpp +++ b/Tactility/Source/app/applist/AppList.cpp @@ -2,11 +2,12 @@ #include #include -#include - #include #include +#include +#include + namespace tt::app::applist { class AppListApp final : public App { @@ -17,8 +18,10 @@ 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() : TT_ASSETS_APP_ICON_FALLBACK; + const void* icon = !manifest->appIcon.empty() ? manifest->appIcon.c_str() : LVGL_SYMBOL_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_SYMBOL_FONT_DEFAULT, LV_PART_MAIN); lv_obj_add_event_cb(btn, &onAppPressed, LV_EVENT_SHORT_CLICKED, manifest.get()); } diff --git a/Tactility/Source/app/appsettings/AppSettings.cpp b/Tactility/Source/app/appsettings/AppSettings.cpp index c55621e0f..1fc2a440a 100644 --- a/Tactility/Source/app/appsettings/AppSettings.cpp +++ b/Tactility/Source/app/appsettings/AppSettings.cpp @@ -1,9 +1,10 @@ -#include +#include +#include + #include -#include +#include #include - -#include +#include #include #include @@ -18,8 +19,10 @@ 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() : TT_ASSETS_APP_ICON_FALLBACK; + const void* icon = !manifest->appIcon.empty() ? manifest->appIcon.c_str() : LVGL_SYMBOL_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_SYMBOL_FONT_DEFAULT, LV_PART_MAIN); lv_obj_add_event_cb(btn, &onAppPressed, LV_EVENT_SHORT_CLICKED, manifest.get()); } @@ -59,6 +62,7 @@ class AppSettingsApp final : public App { extern const AppManifest manifest = { .appId = "AppSettings", .appName = "Apps", + .appIcon = LVGL_SYMBOL_APPS, .appCategory = Category::Settings, .createApp = create, }; diff --git a/Tactility/Source/app/chat/ChatApp.cpp b/Tactility/Source/app/chat/ChatApp.cpp index 20355c419..25a3d0f77 100644 --- a/Tactility/Source/app/chat/ChatApp.cpp +++ b/Tactility/Source/app/chat/ChatApp.cpp @@ -8,13 +8,13 @@ #include #include -#include #include #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 = TT_ASSETS_APP_ICON_CHAT, + .appIcon = LVGL_SYMBOL_FORUM, .createApp = create }; diff --git a/Tactility/Source/app/development/Development.cpp b/Tactility/Source/app/development/Development.cpp index d2ddf5d48..21b9c71bd 100644 --- a/Tactility/Source/app/development/Development.cpp +++ b/Tactility/Source/app/development/Development.cpp @@ -13,6 +13,8 @@ #include #include +#include + #include #include @@ -163,6 +165,7 @@ class DevelopmentApp final : public App { extern const AppManifest manifest = { .appId = "Development", .appName = "Development", + .appIcon = LVGL_SYMBOL_DEVICES, .appCategory = Category::Settings, .createApp = create }; diff --git a/Tactility/Source/app/display/Display.cpp b/Tactility/Source/app/display/Display.cpp index efc97e298..f5938c683 100644 --- a/Tactility/Source/app/display/Display.cpp +++ b/Tactility/Source/app/display/Display.cpp @@ -1,13 +1,15 @@ #include +#include + #ifdef ESP_PLATFORM #include #endif -#include -#include -#include + #include +#include #include +#include #include @@ -304,7 +306,7 @@ class DisplayApp final : public App { extern const AppManifest manifest = { .appId = "Display", .appName = "Display", - .appIcon = TT_ASSETS_APP_ICON_DISPLAY_SETTINGS, + .appIcon = LVGL_SYMBOL_DISPLAY_SETTINGS, .appCategory = Category::Settings, .createApp = create }; diff --git a/Tactility/Source/app/files/FilesApp.cpp b/Tactility/Source/app/files/FilesApp.cpp index 586f8b703..ee2637744 100644 --- a/Tactility/Source/app/files/FilesApp.cpp +++ b/Tactility/Source/app/files/FilesApp.cpp @@ -39,7 +39,6 @@ class FilesApp final : public App { extern const AppManifest manifest = { .appId = "Files", .appName = "Files", - .appIcon = TT_ASSETS_APP_ICON_FILES, .appCategory = Category::System, .appFlags = AppManifest::Flags::Hidden, .createApp = create diff --git a/Tactility/Source/app/fileselection/FileSelection.cpp b/Tactility/Source/app/fileselection/FileSelection.cpp index 6237b6e44..acf2dcf2f 100644 --- a/Tactility/Source/app/fileselection/FileSelection.cpp +++ b/Tactility/Source/app/fileselection/FileSelection.cpp @@ -58,7 +58,6 @@ class FileSelection : public App { extern const AppManifest manifest = { .appId = "FileSelection", .appName = "File Selection", - .appIcon = TT_ASSETS_APP_ICON_FILES, .appCategory = Category::System, .appFlags = AppManifest::Flags::Hidden, .createApp = create diff --git a/Tactility/Source/app/gpssettings/GpsSettings.cpp b/Tactility/Source/app/gpssettings/GpsSettings.cpp index c0ef599d3..396acbdc3 100644 --- a/Tactility/Source/app/gpssettings/GpsSettings.cpp +++ b/Tactility/Source/app/gpssettings/GpsSettings.cpp @@ -10,6 +10,8 @@ #include #include +#include + #include #include #include @@ -453,7 +455,7 @@ class GpsSettingsApp final : public App { extern const AppManifest manifest = { .appId = "GpsSettings", .appName = "GPS", - .appIcon = LV_SYMBOL_GPS, + .appIcon = LVGL_SYMBOL_NAVIGATION, .appCategory = Category::Settings, .createApp = create }; diff --git a/Tactility/Source/app/i2cscanner/I2cScanner.cpp b/Tactility/Source/app/i2cscanner/I2cScanner.cpp index e1156edec..52d0d92ec 100644 --- a/Tactility/Source/app/i2cscanner/I2cScanner.cpp +++ b/Tactility/Source/app/i2cscanner/I2cScanner.cpp @@ -11,11 +11,12 @@ #include #include #include -#include #include #include +#include + namespace tt::app::i2cscanner { extern const AppManifest manifest; @@ -410,7 +411,7 @@ void I2cScannerApp::onScanTimerFinished() { extern const AppManifest manifest = { .appId = "I2cScanner", .appName = "I2C Scanner", - .appIcon = TT_ASSETS_APP_ICON_I2C_SETTINGS, + .appIcon = LVGL_SYMBOL_SEARCH, .appCategory = Category::System, .createApp = create }; diff --git a/Tactility/Source/app/keyboard/KeyboardSettings.cpp b/Tactility/Source/app/keyboard/KeyboardSettings.cpp index 5706f4c59..a343a89be 100644 --- a/Tactility/Source/app/keyboard/KeyboardSettings.cpp +++ b/Tactility/Source/app/keyboard/KeyboardSettings.cpp @@ -3,9 +3,10 @@ #include #include -#include #include +#include + #include // Forward declare driver functions @@ -182,7 +183,7 @@ class KeyboardSettingsApp final : public App { extern const AppManifest manifest = { .appId = "KeyboardSettings", .appName = "Keyboard", - .appIcon = TT_ASSETS_APP_ICON_SETTINGS, + .appIcon = LVGL_SYMBOL_KEYBOARD_ALT, .appCategory = Category::Settings, .createApp = create }; diff --git a/Tactility/Source/app/launcher/Launcher.cpp b/Tactility/Source/app/launcher/Launcher.cpp index 7ff7bdf74..640c5e912 100644 --- a/Tactility/Source/app/launcher/Launcher.cpp +++ b/Tactility/Source/app/launcher/Launcher.cpp @@ -4,22 +4,24 @@ #include #include #include -#include #include #include #include #include +#include +#include + namespace tt::app::launcher { static const auto LOGGER = Logger("Launcher"); static int getButtonSize(hal::UiScale scale) { if (scale == hal::UiScale::Smallest) { - return 40; + return 36; // icon size } else { - return 64; + return 56; } } @@ -41,7 +43,9 @@ class LauncherApp final : public App { // create the image first auto* button_image = lv_image_create(apps_button); + lv_obj_set_style_text_font(button_image, LVGL_SYMBOL_FONT_LAUNCHER, LV_STATE_DEFAULT); lv_image_set_src(button_image, imageFile); + lv_obj_set_style_text_color(button_image, lv_theme_get_color_primary(button_image), LV_STATE_DEFAULT); // Recolor handling: // For color builds use theme primary color @@ -119,7 +123,6 @@ class LauncherApp final : public App { auto button_size = getButtonSize(ui_scale); lv_obj_align(buttons_wrapper, LV_ALIGN_CENTER, 0, 0); - // lv_obj_set_style_pad_all(buttons_wrapper, 0, LV_STATE_DEFAULT); lv_obj_set_size(buttons_wrapper, LV_SIZE_CONTENT, LV_SIZE_CONTENT); lv_obj_set_style_border_width(buttons_wrapper, 0, LV_STATE_DEFAULT); lv_obj_set_flex_grow(buttons_wrapper, 1); @@ -150,14 +153,9 @@ class LauncherApp final : public App { margin = std::min(available_height / 16, button_size); } - const auto paths = app.getPaths(); - const auto apps_icon_path = lvgl::PATH_PREFIX + paths->getAssetsPath("icon_apps.png"); - const auto files_icon_path = lvgl::PATH_PREFIX + paths->getAssetsPath("icon_files.png"); - const auto settings_icon_path = lvgl::PATH_PREFIX + paths->getAssetsPath("icon_settings.png"); - - createAppButton(buttons_wrapper, ui_scale, apps_icon_path.c_str(), "AppList", margin, is_landscape_display); - createAppButton(buttons_wrapper, ui_scale, files_icon_path.c_str(), "Files", margin, is_landscape_display); - createAppButton(buttons_wrapper, ui_scale, settings_icon_path.c_str(), "Settings", margin, is_landscape_display); + createAppButton(buttons_wrapper, ui_scale, LVGL_SYMBOL_APPS, "AppList", margin, is_landscape_display); + createAppButton(buttons_wrapper, ui_scale, LVGL_SYMBOL_FOLDER, "Files", margin, is_landscape_display); + createAppButton(buttons_wrapper, ui_scale, LVGL_SYMBOL_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 93b2858b9..334f95e0b 100644 --- a/Tactility/Source/app/localesettings/LocaleSettings.cpp +++ b/Tactility/Source/app/localesettings/LocaleSettings.cpp @@ -1,18 +1,16 @@ -#include #include -#include #include #include -#include #include #include #include #include #include +#include + #include #include -#include namespace tt::app::localesettings { @@ -163,7 +161,7 @@ class LocaleSettingsApp final : public App { extern const AppManifest manifest = { .appId = "LocaleSettings", .appName = "Region & Language", - .appIcon = TT_ASSETS_APP_ICON_TIME_DATE_SETTINGS, + .appIcon = LVGL_SYMBOL_LANGUAGE, .appCategory = Category::Settings, .createApp = create }; diff --git a/Tactility/Source/app/notes/Notes.cpp b/Tactility/Source/app/notes/Notes.cpp index bd3068c02..217ec7c1d 100644 --- a/Tactility/Source/app/notes/Notes.cpp +++ b/Tactility/Source/app/notes/Notes.cpp @@ -3,12 +3,12 @@ #include #include #include -#include #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 = TT_ASSETS_APP_ICON_NOTES, + .appIcon = LVGL_SYMBOL_EDIT_NOTE, .createApp = create }; diff --git a/Tactility/Source/app/power/Power.cpp b/Tactility/Source/app/power/Power.cpp index 7bf50b12c..a08135535 100644 --- a/Tactility/Source/app/power/Power.cpp +++ b/Tactility/Source/app/power/Power.cpp @@ -6,8 +6,9 @@ #include #include -#include + #include +#include #include @@ -191,7 +192,7 @@ class PowerApp : public App { extern const AppManifest manifest = { .appId = "Power", .appName = "Power", - .appIcon = TT_ASSETS_APP_ICON_POWER_SETTINGS, + .appIcon = LVGL_SYMBOL_ELECTRIC_BOLT, .appCategory = Category::Settings, .createApp = create }; diff --git a/Tactility/Source/app/screenshot/Screenshot.cpp b/Tactility/Source/app/screenshot/Screenshot.cpp index d5db25b81..c91b2c5d2 100644 --- a/Tactility/Source/app/screenshot/Screenshot.cpp +++ b/Tactility/Source/app/screenshot/Screenshot.cpp @@ -15,6 +15,8 @@ #include #include +#include + namespace tt::app::screenshot { static const auto LOGGER = Logger("Screenshot"); @@ -283,7 +285,7 @@ void ScreenshotApp::onShow(AppContext& appContext, lv_obj_t* parent) { extern const AppManifest manifest = { .appId = "Screenshot", .appName = "Screenshot", - .appIcon = LV_SYMBOL_IMAGE, + .appIcon = LVGL_SYMBOL_IMAGE, .appCategory = Category::System, .createApp = create }; diff --git a/Tactility/Source/app/settings/Settings.cpp b/Tactility/Source/app/settings/Settings.cpp index 8f6e93615..f1c5662e3 100644 --- a/Tactility/Source/app/settings/Settings.cpp +++ b/Tactility/Source/app/settings/Settings.cpp @@ -2,8 +2,10 @@ #include #include -#include #include +#include +#include + #include #include @@ -17,9 +19,11 @@ static void onAppPressed(lv_event_t* e) { static void createWidget(const std::shared_ptr& manifest, void* parent) { check(parent); - auto* list = (lv_obj_t*)parent; - const void* icon = !manifest->appIcon.empty() ? manifest->appIcon.c_str() : TT_ASSETS_APP_ICON_FALLBACK; + auto* list = static_cast(parent); + const void* icon = !manifest->appIcon.empty() ? manifest->appIcon.c_str() : LVGL_SYMBOL_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_SYMBOL_FONT_DEFAULT, LV_PART_MAIN); lv_obj_add_event_cb(btn, &onAppPressed, LV_EVENT_SHORT_CLICKED, (void*)manifest.get()); } @@ -48,7 +52,7 @@ class SettingsApp final : public App { extern const AppManifest manifest = { .appId = "Settings", .appName = "Settings", - .appIcon = TT_ASSETS_APP_ICON_SETTINGS, + .appIcon = LVGL_SYMBOL_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 771c1cd3d..53c50e74b 100644 --- a/Tactility/Source/app/systeminfo/SystemInfo.cpp +++ b/Tactility/Source/app/systeminfo/SystemInfo.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -701,7 +702,7 @@ class SystemInfoApp final : public App { extern const AppManifest manifest = { .appId = "SystemInfo", .appName = "System Info", - .appIcon = TT_ASSETS_APP_ICON_SYSTEM_INFO, + .appIcon = LVGL_SYMBOL_AREA_CHART, .appCategory = Category::System, .createApp = create }; diff --git a/Tactility/Source/app/timedatesettings/TimeDateSettings.cpp b/Tactility/Source/app/timedatesettings/TimeDateSettings.cpp index b52bccf7d..b9d520358 100644 --- a/Tactility/Source/app/timedatesettings/TimeDateSettings.cpp +++ b/Tactility/Source/app/timedatesettings/TimeDateSettings.cpp @@ -1,4 +1,3 @@ -#include #include #include #include @@ -11,6 +10,8 @@ #include +#include + namespace tt::app::timedatesettings { static const auto LOGGER = Logger("TimeDate"); @@ -154,7 +155,7 @@ class TimeDateSettingsApp final : public App { extern const AppManifest manifest = { .appId = "TimeDateSettings", .appName = "Time & Date", - .appIcon = TT_ASSETS_APP_ICON_TIME_DATE_SETTINGS, + .appIcon = LVGL_SYMBOL_CALENDAR_MONTH, .appCategory = Category::Settings, .createApp = create }; diff --git a/Tactility/Source/app/trackball/TrackballSettings.cpp b/Tactility/Source/app/trackball/TrackballSettings.cpp index 2cc3e3943..4c46ecad5 100644 --- a/Tactility/Source/app/trackball/TrackballSettings.cpp +++ b/Tactility/Source/app/trackball/TrackballSettings.cpp @@ -3,11 +3,12 @@ #include #include -#include #include #include +#include + // Forward declare driver functions namespace trackball { void setEnabled(bool enabled); @@ -209,7 +210,7 @@ class TrackballSettingsApp final : public App { extern const AppManifest manifest = { .appId = "TrackballSettings", .appName = "Trackball", - .appIcon = TT_ASSETS_APP_ICON_SETTINGS, + .appIcon = LVGL_SYMBOL_CIRCLE, .appCategory = Category::Settings, .createApp = create }; diff --git a/Tactility/Source/app/usbsettings/UsbSettings.cpp b/Tactility/Source/app/usbsettings/UsbSettings.cpp index 9d8f05217..c16109b35 100644 --- a/Tactility/Source/app/usbsettings/UsbSettings.cpp +++ b/Tactility/Source/app/usbsettings/UsbSettings.cpp @@ -1,12 +1,12 @@ -#include "Tactility/app/App.h" -#include "Tactility/app/AppManifest.h" -#include "Tactility/lvgl/Toolbar.h" - -#include +#include +#include #include +#include #include +#include + #define TAG "usb_settings" namespace tt::app::usbsettings { @@ -62,7 +62,7 @@ class UsbSettingsApp : public App { extern const AppManifest manifest = { .appId = "UsbSettings", .appName = "USB", - .appIcon = LV_SYMBOL_USB, + .appIcon = LVGL_SYMBOL_USB, .appCategory = Category::Settings, .createApp = create }; diff --git a/Tactility/Source/app/webserversettings/WebServerSettings.cpp b/Tactility/Source/app/webserversettings/WebServerSettings.cpp index aaf36e303..fda795543 100644 --- a/Tactility/Source/app/webserversettings/WebServerSettings.cpp +++ b/Tactility/Source/app/webserversettings/WebServerSettings.cpp @@ -12,6 +12,7 @@ #include #include +#include #include #include @@ -417,7 +418,7 @@ class WebServerSettingsApp final : public App { extern const AppManifest manifest = { .appId = "WebServerSettings", .appName = "Web Server", - .appIcon = TT_ASSETS_APP_ICON_SETTINGS, + .appIcon = LVGL_SYMBOL_CLOUD, .appCategory = Category::System, .createApp = create }; diff --git a/Tactility/Source/app/wifimanage/WifiManage.cpp b/Tactility/Source/app/wifimanage/WifiManage.cpp index 9b035afcd..a890fbf12 100644 --- a/Tactility/Source/app/wifimanage/WifiManage.cpp +++ b/Tactility/Source/app/wifimanage/WifiManage.cpp @@ -9,6 +9,8 @@ #include #include +#include + namespace tt::app::wifimanage { static const auto LOGGER = Logger("WifiManage"); @@ -142,7 +144,7 @@ void WifiManage::onHide(AppContext& app) { extern const AppManifest manifest = { .appId = "WifiManage", .appName = "Wi-Fi", - .appIcon = LV_SYMBOL_WIFI, + .appIcon = LVGL_SYMBOL_WIFI, .appCategory = Category::Settings, .createApp = create };