From 3a57d1018ef284de7bb6ece2ac8dc799479c369c Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Mon, 1 Oct 2018 17:56:46 +0300 Subject: Add option to configure the font size fixes #161 --- src/main.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/main.cpp') 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(); -- cgit 1.5.1