Enhance theme management with dynamic discovery and macOS bundle support

- Updated CMake configuration to ensure theme files are included in macOS bundles and added explicit file handling for theme resources.
- Refactored ThemeManager to replace hardcoded theme lists with dynamic discovery of available themes, improving flexibility across development and deployment scenarios.
- Introduced methods for refreshing and loading themes at runtime, enhancing user experience and customization options.
- Improved logging for theme loading processes, providing better feedback on successes and failures.
This commit is contained in:
scawful
2025-09-26 19:55:40 -04:00
parent 83d31556bb
commit c5e8e04f65
4 changed files with 190 additions and 16 deletions

View File

@@ -122,11 +122,14 @@ endif()
# ImGui (after minimal build flags are set)
include(cmake/imgui.cmake)
# Project Files
# Copy theme files to build directory
# Project Files
# Copy theme files to build directory (for development)
file(GLOB THEME_FILES "${CMAKE_SOURCE_DIR}/assets/themes/*.theme")
file(COPY ${THEME_FILES} DESTINATION "${CMAKE_BINARY_DIR}/assets/themes/")
# IMPORTANT: Also ensure themes are included in macOS bundles
# This is handled in src/CMakeLists.txt via YAZE_RESOURCE_FILES
add_subdirectory(src)
# Tests