mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
default settings
This commit is contained in:
parent
566402a1bf
commit
51ac007baf
@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
#include "settings.h"
|
||||
#include "smileypack.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDir>
|
||||
@ -22,6 +23,7 @@
|
||||
#include <QSettings>
|
||||
#include <QStandardPaths>
|
||||
#include <QDebug>
|
||||
#include <QList>
|
||||
|
||||
const QString Settings::FILENAME = "settings.ini";
|
||||
bool Settings::makeToxPortable{false};
|
||||
@ -92,7 +94,7 @@ void Settings::load()
|
||||
|
||||
s.beginGroup("GUI");
|
||||
enableSmoothAnimation = s.value("smoothAnimation", true).toBool();
|
||||
smileyPack = s.value("smileyPack").toByteArray();
|
||||
smileyPack = s.value("smileyPack", !SmileyPack::listSmileyPacks().empty() ? SmileyPack::listSmileyPacks()[0].second : "").toString();
|
||||
customEmojiFont = s.value("customEmojiFont", true).toBool();
|
||||
emojiFontFamily = s.value("emojiFontFamily", "DejaVu Sans").toString();
|
||||
emojiFontPointSize = s.value("emojiFontPointSize", QApplication::font().pointSize()).toInt();
|
||||
|
@ -28,7 +28,7 @@ class SmileyPack : public QObject
|
||||
Q_OBJECT
|
||||
public:
|
||||
static SmileyPack& getInstance();
|
||||
static QList<QPair<QString, QString>> listSmileyPacks(const QString& path);
|
||||
static QList<QPair<QString, QString>> listSmileyPacks(const QString& path = "./smileys");
|
||||
|
||||
bool load(const QString &filename);
|
||||
QString smileyfied(QString msg);
|
||||
|
@ -53,7 +53,7 @@ SettingsForm::SettingsForm()
|
||||
makeToxPortable.setChecked(Settings::getInstance().getMakeToxPortable());
|
||||
|
||||
smileyPackLabel.setText(tr("Smiley Pack", "Text on smiley pack label"));
|
||||
for (auto entry : SmileyPack::listSmileyPacks("./smileys"))
|
||||
for (auto entry : SmileyPack::listSmileyPacks())
|
||||
smileyPackBrowser.addItem(entry.first, entry.second);
|
||||
smileyPackBrowser.setCurrentIndex(smileyPackBrowser.findData(Settings::getInstance().getSmileyPack()));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user