summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorLorenDB <computersemiexpert@outlook.com>2020-10-19 20:38:18 -0400
committerLorenDB <computersemiexpert@outlook.com>2020-10-21 17:57:29 -0400
commit8a188ac6f7a4f0f4ebad009c9fd932b005a718c9 (patch)
tree063f3398192a8a082853d47501193f0fe8037f07 /src
parentFix corrupt channel + add additional debugging (diff)
downloadnheko-8a188ac6f7a4f0f4ebad009c9fd932b005a718c9.tar.xz
Use QFontComboBox as per issue 238 (deleted comments)
Note: I have deleted commented code as per the suggestion of @utkarsh2102.
Note 2: I have fixed all the diffs, etc.
Diffstat (limited to 'src')
-rw-r--r--src/UserSettingsPage.cpp7
-rw-r--r--src/UserSettingsPage.h3
2 files changed, 4 insertions, 6 deletions
diff --git a/src/UserSettingsPage.cpp b/src/UserSettingsPage.cpp

index 8f049a29..4278180b 100644 --- a/src/UserSettingsPage.cpp +++ b/src/UserSettingsPage.cpp
@@ -18,6 +18,7 @@ #include <QApplication> #include <QComboBox> #include <QFileDialog> +#include <QFontComboBox> #include <QFormLayout> #include <QInputDialog> #include <QLabel> @@ -470,7 +471,7 @@ UserSettingsPage::UserSettingsPage(QSharedPointer<UserSettings> settings, QWidge useStunServer_ = new Toggle{this}; scaleFactorCombo_ = new QComboBox{this}; fontSizeCombo_ = new QComboBox{this}; - fontSelectionCombo_ = new QComboBox{this}; + fontSelectionCombo_ = new QFontComboBox{this}; emojiFontSelectionCombo_ = new QComboBox{this}; timelineMaxWidthSpin_ = new QSpinBox{this}; @@ -490,10 +491,6 @@ UserSettingsPage::UserSettingsPage(QSharedPointer<UserSettings> settings, QWidge fontSizeCombo_->addItem(QString("%1 ").arg(QString::number(option))); 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 // all emoji fonts? diff --git a/src/UserSettingsPage.h b/src/UserSettingsPage.h
index e4a34893..37355602 100644 --- a/src/UserSettingsPage.h +++ b/src/UserSettingsPage.h
@@ -27,6 +27,7 @@ class Toggle; class QLabel; class QFormLayout; class QComboBox; +class QFontComboBox; class QSpinBox; class QHBoxLayout; class QVBoxLayout; @@ -261,7 +262,7 @@ private: QComboBox *themeCombo_; QComboBox *scaleFactorCombo_; QComboBox *fontSizeCombo_; - QComboBox *fontSelectionCombo_; + QFontComboBox *fontSelectionCombo_; QComboBox *emojiFontSelectionCombo_; QSpinBox *timelineMaxWidthSpin_;