From 22d0f50e366848879cb3010a61e05f95cedd5f3f Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Sat, 1 Jul 2017 15:21:07 +0300 Subject: [PATCH] Add option for the default font size --- README.md | 2 +- src/main.cc | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 591190d..c6104cf 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ encouraged to open feature request issues. Here is a screen shot to get a feel for the UI, but things will probably change. -![nheko](https://dl.dropboxusercontent.com/s/cs2891enrf2lqo9/nheko.jpg) +![nheko](https://dl.dropboxusercontent.com/s/5iydk5r3b9zyycd/nheko-ui.png) ### Third party diff --git a/src/main.cc b/src/main.cc index bf165ca..2852385 100644 --- a/src/main.cc +++ b/src/main.cc @@ -41,7 +41,13 @@ int main(int argc, char *argv[]) app.setWindowIcon(QIcon(":/logos/nheko.png")); - QFont font("Open Sans"); + QSettings settings; + + // Set the default if a value has not been set. + if (settings.value("font/size").toInt() == 0) + settings.setValue("font/size", 12); + + QFont font("Open Sans", settings.value("font/size").toInt()); app.setFont(font); QString lang = QLocale::system().name();