mirror of
https://github.com/YACReader/yacreader
synced 2026-04-12 15:49:53 -04:00
Use target app and version in themes meta
This commit is contained in:
@ -145,7 +145,7 @@ int main(int argc, char **argv)
|
||||
auto *appearanceConfig = new AppearanceConfiguration(
|
||||
YACReader::getSettingsPath() + "/YACReaderLibrary.ini", qApp);
|
||||
auto *themeRepo = new ThemeRepository(
|
||||
":/themes", YACReader::getSettingsPath() + "/themes/user");
|
||||
":/themes", YACReader::getSettingsPath() + "/themes/user", "YACReaderLibrary");
|
||||
ThemeManager::instance().initialize(appearanceConfig, themeRepo);
|
||||
|
||||
// Set window icon according to Freedesktop icon specification
|
||||
|
||||
@ -106,7 +106,9 @@
|
||||
"meta": {
|
||||
"displayName": "Default Classic",
|
||||
"id": "builtin/classic",
|
||||
"variant": "dark"
|
||||
"targetApp": "YACReaderLibrary",
|
||||
"variant": "dark",
|
||||
"version": "10.0.0"
|
||||
},
|
||||
"metadataScraperDialog": {
|
||||
"busyIndicatorColor": "#ffffff",
|
||||
|
||||
@ -106,7 +106,9 @@
|
||||
"meta": {
|
||||
"displayName": "Default Dark",
|
||||
"id": "builtin/dark",
|
||||
"variant": "dark"
|
||||
"targetApp": "YACReaderLibrary",
|
||||
"variant": "dark",
|
||||
"version": "10.0.0"
|
||||
},
|
||||
"metadataScraperDialog": {
|
||||
"busyIndicatorColor": "#ffffff",
|
||||
|
||||
@ -106,7 +106,9 @@
|
||||
"meta": {
|
||||
"displayName": "Default Light",
|
||||
"id": "builtin/light",
|
||||
"variant": "light"
|
||||
"targetApp": "YACReaderLibrary",
|
||||
"variant": "light",
|
||||
"version": "10.0.0"
|
||||
},
|
||||
"metadataScraperDialog": {
|
||||
"busyIndicatorColor": "#000000",
|
||||
|
||||
@ -1165,6 +1165,8 @@ Theme makeTheme(const QJsonObject &json)
|
||||
p.meta.variant = ThemeVariant::Light;
|
||||
else if (variantStr == "dark")
|
||||
p.meta.variant = ThemeVariant::Dark;
|
||||
p.meta.targetApp = o["targetApp"].toString(p.meta.targetApp);
|
||||
p.meta.version = o["version"].toString(p.meta.version);
|
||||
}
|
||||
|
||||
Theme theme = makeTheme(p);
|
||||
|
||||
Reference in New Issue
Block a user