Merge pull request #303 from LorenDB/master

Change the font box to QFontComboBox as per issue 238
This commit is contained in:
DeepBlueV7.X 2020-10-22 00:31:19 +02:00 committed by GitHub
commit b9f2caa238
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View file

@ -18,6 +18,7 @@
#include <QApplication> #include <QApplication>
#include <QComboBox> #include <QComboBox>
#include <QFileDialog> #include <QFileDialog>
#include <QFontComboBox>
#include <QFormLayout> #include <QFormLayout>
#include <QInputDialog> #include <QInputDialog>
#include <QLabel> #include <QLabel>
@ -470,7 +471,7 @@ UserSettingsPage::UserSettingsPage(QSharedPointer<UserSettings> settings, QWidge
useStunServer_ = new Toggle{this}; useStunServer_ = new Toggle{this};
scaleFactorCombo_ = new QComboBox{this}; scaleFactorCombo_ = new QComboBox{this};
fontSizeCombo_ = new QComboBox{this}; fontSizeCombo_ = new QComboBox{this};
fontSelectionCombo_ = new QComboBox{this}; fontSelectionCombo_ = new QFontComboBox{this};
emojiFontSelectionCombo_ = new QComboBox{this}; emojiFontSelectionCombo_ = new QComboBox{this};
timelineMaxWidthSpin_ = new QSpinBox{this}; timelineMaxWidthSpin_ = new QSpinBox{this};
@ -490,10 +491,6 @@ UserSettingsPage::UserSettingsPage(QSharedPointer<UserSettings> settings, QWidge
fontSizeCombo_->addItem(QString("%1 ").arg(QString::number(option))); fontSizeCombo_->addItem(QString("%1 ").arg(QString::number(option)));
QFontDatabase fontDb; QFontDatabase fontDb;
auto fontFamilies = fontDb.families();
for (const auto &family : fontFamilies) {
fontSelectionCombo_->addItem(family);
}
// TODO: Is there a way to limit to just emojis, rather than // TODO: Is there a way to limit to just emojis, rather than
// all emoji fonts? // all emoji fonts?

View file

@ -27,6 +27,7 @@ class Toggle;
class QLabel; class QLabel;
class QFormLayout; class QFormLayout;
class QComboBox; class QComboBox;
class QFontComboBox;
class QSpinBox; class QSpinBox;
class QHBoxLayout; class QHBoxLayout;
class QVBoxLayout; class QVBoxLayout;
@ -261,7 +262,7 @@ private:
QComboBox *themeCombo_; QComboBox *themeCombo_;
QComboBox *scaleFactorCombo_; QComboBox *scaleFactorCombo_;
QComboBox *fontSizeCombo_; QComboBox *fontSizeCombo_;
QComboBox *fontSelectionCombo_; QFontComboBox *fontSelectionCombo_;
QComboBox *emojiFontSelectionCombo_; QComboBox *emojiFontSelectionCombo_;
QSpinBox *timelineMaxWidthSpin_; QSpinBox *timelineMaxWidthSpin_;