mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
Fix custom download path.
Use Apple Emoji font on Mac. Fix emoji font size in settings.
This commit is contained in:
parent
53d79ef48b
commit
a9812245dc
2 changed files with 11 additions and 2 deletions
|
|
@ -114,6 +114,8 @@ SettingsModel::SettingsModel (QObject *parent) : QObject(parent) {
|
|||
});
|
||||
#endif
|
||||
updateRlsUri();
|
||||
shared_ptr<linphone::Factory> factory = linphone::Factory::get();
|
||||
factory->setDownloadDir(Utils::appStringToCoreString(getDownloadFolder()));
|
||||
}
|
||||
|
||||
SettingsModel::~SettingsModel()
|
||||
|
|
@ -1509,7 +1511,7 @@ void SettingsModel::setTextMessageFontSize(const int& size){
|
|||
|
||||
QFont SettingsModel::getEmojiFont() const{
|
||||
QString family = Utils::coreStringToAppString(mConfig->getString(UiSection, "emoji_font", Utils::appStringToCoreString(QFont(Constants::DefaultEmojiFont).family())));
|
||||
int pointSize = getTextMessageFontSize();
|
||||
int pointSize = getEmojiFontSize();
|
||||
return QFont(family,pointSize);
|
||||
}
|
||||
|
||||
|
|
@ -1583,7 +1585,10 @@ QString SettingsModel::getDownloadFolder () const {
|
|||
|
||||
void SettingsModel::setDownloadFolder (const QString &folder) {
|
||||
QString cleanedFolder = QDir::cleanPath(folder) + QDir::separator();
|
||||
mConfig->setString(UiSection, "download_folder", Utils::appStringToCoreString(cleanedFolder));
|
||||
auto lFolder = Utils::appStringToCoreString(cleanedFolder);
|
||||
mConfig->setString(UiSection, "download_folder", lFolder);
|
||||
shared_ptr<linphone::Factory> factory = linphone::Factory::get();
|
||||
factory->setDownloadDir(lFolder);
|
||||
emit downloadFolderChanged(cleanedFolder);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,11 @@ public:
|
|||
static constexpr char DefaultLocale[] = "en";
|
||||
static constexpr char DefaultFont[] = "Noto Sans";
|
||||
static constexpr int DefaultFontPointSize = 10;
|
||||
#ifdef __APPLE__
|
||||
static constexpr char DefaultEmojiFont[] = "Apple Color Emoji";
|
||||
#else
|
||||
static constexpr char DefaultEmojiFont[] = "Noto Color Emoji";
|
||||
#endif
|
||||
static constexpr int DefaultEmojiFontPointSize = 10;
|
||||
|
||||
static constexpr size_t MaxLogsCollectionSize = 10485760*5; // 50MB.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue