set default theme to moonlight

This commit is contained in:
Le Tan 2021-01-01 19:11:48 +08:00
parent 220fba09a9
commit 3b046ab0ee
3 changed files with 11 additions and 1 deletions

View File

@ -42,6 +42,8 @@ void MainConfig::init()
m_widgetConfig->init(appJobj, userJobj);
if (isVersionChanged()) {
doVersionSpecificOverride();
// Update user config.
writeToSettings();
}
@ -111,3 +113,9 @@ QString MainConfig::getVersion(const QJsonObject &p_jobj)
const auto metadataObj = p_jobj.value(QStringLiteral("metadata")).toObject();
return metadataObj.value(QStringLiteral("version")).toString();
}
void MainConfig::doVersionSpecificOverride()
{
// In a new version, we may want to change one value by force.
m_coreConfig->setTheme(QStringLiteral("moonlight"));
}

View File

@ -44,6 +44,8 @@ namespace vnotex
QJsonObject saveMetaData() const;
void doVersionSpecificOverride();
// Version of VNoteX.
QString m_version;

View File

@ -6,7 +6,7 @@
"version" : "3.0.0-beta.3"
},
"core" : {
"theme" : "native",
"theme" : "moonlight",
"locale" : "",
"shortcuts" : {
"FullScreen" : "F11",