diff options
author | redsky17 <joedonofry@gmail.com> | 2019-01-19 16:20:41 +0000 |
---|---|---|
committer | redsky17 <joedonofry@gmail.com> | 2019-01-19 16:20:41 +0000 |
commit | 654b652db4493b4f27da3009307b832dc5e90396 (patch) | |
tree | a4a2eb129d8554df1bf415c818b5f9de88b40817 /src/main.cpp | |
parent | Modified the code that generates user's colors so that it will (diff) | |
download | nheko-654b652db4493b4f27da3009307b832dc5e90396.tar.xz |
Add User Font Setting
User can now select a font from the installed fonts on their system This font currently will only be applied when nheko is restarted (similar to how font size and scaling currently work). This will be addressed in a future commit. Additionally, the dropdown does not correctly select the previously-chosen user font, and instead defaults to the first font available on the system (alphabetically). This is similar to the issue with the 'Theme' combo defaulting to 'Light' even when another theme is selected.
Diffstat (limited to '')
-rw-r--r-- | src/main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 591d348a..fe7ea2ff 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -147,6 +147,10 @@ main(int argc, char *argv[]) QSettings settings; QFont font; + QString userFontFamily = settings.value("user/font_family", "").toString(); + if (!userFontFamily.isEmpty()) { + font.setFamily(userFontFamily); + } font.setPointSizeF(settings.value("user/font_size", font.pointSizeF()).toDouble()); app.setFont(font); |