From 654b652db4493b4f27da3009307b832dc5e90396 Mon Sep 17 00:00:00 2001 From: redsky17 Date: Sat, 19 Jan 2019 16:20:41 +0000 Subject: 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. --- src/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/main.cpp') 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); -- cgit 1.5.1