summary refs log tree commit diff
path: root/src/UserSettingsPage.cpp
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-10-07 12:58:38 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-10-07 12:58:38 +0300
commitc2faaa4d39900fc15f940e6dc32cba382491f1e5 (patch)
treecb6eb8c6affbe57bbaac7b45c4a2122d06f67aca /src/UserSettingsPage.cpp
parentRemove room re-ordering option (diff)
downloadnheko-c2faaa4d39900fc15f940e6dc32cba382491f1e5.tar.xz
Add the correct parent to scaleCombo
Diffstat (limited to '')
-rw-r--r--src/UserSettingsPage.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/UserSettingsPage.cpp b/src/UserSettingsPage.cpp
index cd49e62b..15ad72e1 100644
--- a/src/UserSettingsPage.cpp
+++ b/src/UserSettingsPage.cpp
@@ -200,18 +200,14 @@ UserSettingsPage::UserSettingsPage(QSharedPointer<UserSettings> settings, QWidge
 
         auto scaleFactorOptionLayout = new QHBoxLayout;
         scaleFactorOptionLayout->setContentsMargins(0, OptionMargin, 0, OptionMargin);
-        auto scaleFactorLabel = new QLabel(tr("Scale factor (requires restart)"), this);
+        auto scaleFactorLabel = new QLabel(tr("Scale factor"), this);
         scaleFactorLabel->setFont(font);
         scaleFactorCombo_ = new QComboBox(this);
-        scaleFactorCombo_->addItem("1");
-        scaleFactorCombo_->addItem("1.25");
-        scaleFactorCombo_->addItem("1.5");
-        scaleFactorCombo_->addItem("1.75");
-        scaleFactorCombo_->addItem("2");
-        scaleFactorCombo_->addItem("2.25");
-        scaleFactorCombo_->addItem("2.5");
-        scaleFactorCombo_->addItem("2.75");
-        scaleFactorCombo_->addItem("3");
+        for (double option = 1; option <= 3; option += 0.25)
+                scaleFactorCombo_->addItem(QString::number(option));
+
+        scaleFactorOptionLayout->addWidget(scaleFactorLabel);
+        scaleFactorOptionLayout->addWidget(scaleFactorCombo_, 0, Qt::AlignRight);
 
         auto fontSizeOptionLayout = new QHBoxLayout;
         fontSizeOptionLayout->setContentsMargins(0, OptionMargin, 0, OptionMargin);
@@ -319,10 +315,9 @@ UserSettingsPage::UserSettingsPage(QSharedPointer<UserSettings> settings, QWidge
 #if defined(Q_OS_MAC)
         scaleFactorLabel->hide();
         scaleFactorCombo_->hide();
-#else
-        mainLayout_->addLayout(scaleFactorOptionLayout);
 #endif
 
+        mainLayout_->addLayout(scaleFactorOptionLayout);
         mainLayout_->addLayout(fontSizeOptionLayout);
         mainLayout_->addWidget(new HorizontalLine(this));
         mainLayout_->addLayout(themeOptionLayout_);