summary refs log tree commit diff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-10-01 17:56:46 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-10-01 17:56:46 +0300
commit3a57d1018ef284de7bb6ece2ac8dc799479c369c (patch)
tree099edf49d1e91c8bd91c56cae69f49735cef5aef /src/main.cpp
parentEnable debug logs (diff)
downloadnheko-3a57d1018ef284de7bb6ece2ac8dc799479c369c.tar.xz
Add option to configure the font size
fixes #161
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 3e33c198..8556f8cb 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -150,7 +150,12 @@ main(int argc, char *argv[])
                 std::exit(1);
         }
 
-        app.setFont(QFont("Open Sans"));
+        QSettings settings;
+
+        QFont font("Open Sans");
+        font.setPointSizeF(settings.value("user/font_size", font.pointSizeF()).toDouble());
+
+        app.setFont(font);
 
         QString lang = QLocale::system().name();
 
@@ -167,8 +172,6 @@ main(int argc, char *argv[])
         // Move the MainWindow to the center
         w.move(screenCenter(w.width(), w.height()));
 
-        QSettings settings;
-
         if (!settings.value("user/window/start_in_tray", false).toBool() ||
             !settings.value("user/window/tray", true).toBool())
                 w.show();