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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user