Use json file based themes instead of code to create them (theme editor + theme mode settings)

This commit is contained in:
luisangelsm
2026-03-02 21:23:39 +01:00
parent 87fada611d
commit 547e48cc04
42 changed files with 2776 additions and 1145 deletions

View File

@ -21,7 +21,9 @@
#include "db_helper.h"
#include "yacreader_libraries.h"
#include "exit_check.h"
#include "appearance_configuration.h"
#include "theme_manager.h"
#include "theme_repository.h"
#ifdef Q_OS_MACOS
#include "trayhandler.h"
#endif
@ -140,7 +142,11 @@ int main(int argc, char **argv)
app.setApplicationVersion(VERSION);
// Theme initialization
ThemeManager::instance().initialize();
auto *appearanceConfig = new AppearanceConfiguration(
YACReader::getSettingsPath() + "/YACReaderLibrary.ini", qApp);
auto *themeRepo = new ThemeRepository(
":/themes", YACReader::getSettingsPath() + "/themes/user");
ThemeManager::instance().initialize(appearanceConfig, themeRepo);
// Set window icon according to Freedesktop icon specification
// This is mostly relevant for Linux and other Unix systems