diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-07-01 15:21:07 +0300 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-07-01 15:21:07 +0300 |
commit | 22d0f50e366848879cb3010a61e05f95cedd5f3f (patch) | |
tree | 59b5f6074ec9b04e9e720bcb213165d45b2f98d9 /src/main.cc | |
parent | Set emoji size relative to the default font (diff) | |
download | nheko-22d0f50e366848879cb3010a61e05f95cedd5f3f.tar.xz |
Add option for the default font size
Diffstat (limited to 'src/main.cc')
-rw-r--r-- | src/main.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main.cc b/src/main.cc index bf165cab..28523858 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(); |