mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Clean up config names a bit
This commit is contained in:
parent
23a9306383
commit
50f994bd23
2 changed files with 5 additions and 8 deletions
|
@ -93,7 +93,7 @@ UserSettings::load(std::optional<QString> profile)
|
||||||
sortByImportance_ = settings.value("user/sort_by_unread", true).toBool();
|
sortByImportance_ = settings.value("user/sort_by_unread", true).toBool();
|
||||||
readReceipts_ = settings.value("user/read_receipts", true).toBool();
|
readReceipts_ = settings.value("user/read_receipts", true).toBool();
|
||||||
theme_ = settings.value("user/theme", defaultTheme_).toString();
|
theme_ = settings.value("user/theme", defaultTheme_).toString();
|
||||||
font_ = settings.value("user/font_family", "").toString();
|
font_ = settings.value("user/font_family", "default").toString();
|
||||||
avatarCircles_ = settings.value("user/avatar_circles", true).toBool();
|
avatarCircles_ = settings.value("user/avatar_circles", true).toBool();
|
||||||
decryptSidebar_ = settings.value("user/decrypt_sidebar", true).toBool();
|
decryptSidebar_ = settings.value("user/decrypt_sidebar", true).toBool();
|
||||||
privacyScreen_ = settings.value("user/privacy_screen", false).toBool();
|
privacyScreen_ = settings.value("user/privacy_screen", false).toBool();
|
||||||
|
@ -101,7 +101,7 @@ UserSettings::load(std::optional<QString> profile)
|
||||||
shareKeysWithTrustedUsers_ =
|
shareKeysWithTrustedUsers_ =
|
||||||
settings.value("user/share_keys_with_trusted_users", true).toBool();
|
settings.value("user/share_keys_with_trusted_users", true).toBool();
|
||||||
mobileMode_ = settings.value("user/mobile_mode", false).toBool();
|
mobileMode_ = settings.value("user/mobile_mode", false).toBool();
|
||||||
emojiFont_ = settings.value("user/emoji_font_family", "Default").toString();
|
emojiFont_ = settings.value("user/emoji_font_family", "default").toString();
|
||||||
baseFontSize_ = settings.value("user/font_size", QFont().pointSizeF()).toDouble();
|
baseFontSize_ = settings.value("user/font_size", QFont().pointSizeF()).toDouble();
|
||||||
auto tempPresence = settings.value("user/presence", "").toString().toStdString();
|
auto tempPresence = settings.value("user/presence", "").toString().toStdString();
|
||||||
auto presenceValue = QMetaEnum::fromType<Presence>().keyToValue(tempPresence.c_str());
|
auto presenceValue = QMetaEnum::fromType<Presence>().keyToValue(tempPresence.c_str());
|
||||||
|
@ -343,7 +343,7 @@ UserSettings::setEmojiFontFamily(QString family)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (family == tr("Default")) {
|
if (family == tr("Default")) {
|
||||||
emojiFont_ = "Default";
|
emojiFont_ = "default";
|
||||||
} else {
|
} else {
|
||||||
emojiFont_ = family;
|
emojiFont_ = family;
|
||||||
}
|
}
|
||||||
|
@ -737,10 +737,7 @@ UserSettingsPage::UserSettingsPage(QSharedPointer<UserSettings> settings, QWidge
|
||||||
}
|
}
|
||||||
|
|
||||||
QString currentFont = settings_->font();
|
QString currentFont = settings_->font();
|
||||||
if (currentFont == "Default") {
|
if (currentFont != "default" || currentFont != "") {
|
||||||
fontSelectionCombo_->setCurrentIndex(
|
|
||||||
fontSelectionCombo_->findText(tr(currentFont.toStdString().c_str())));
|
|
||||||
} else {
|
|
||||||
fontSelectionCombo_->setCurrentIndex(fontSelectionCombo_->findText(currentFont));
|
fontSelectionCombo_->setCurrentIndex(fontSelectionCombo_->findText(currentFont));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -214,7 +214,7 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
QFont font;
|
QFont font;
|
||||||
QString userFontFamily = settings.lock()->font();
|
QString userFontFamily = settings.lock()->font();
|
||||||
if (!userFontFamily.isEmpty()) {
|
if (!userFontFamily.isEmpty() && userFontFamily != "default") {
|
||||||
font.setFamily(userFontFamily);
|
font.setFamily(userFontFamily);
|
||||||
}
|
}
|
||||||
font.setPointSizeF(settings.lock()->fontSize());
|
font.setPointSizeF(settings.lock()->fontSize());
|
||||||
|
|
Loading…
Reference in a new issue