From 9cfc585563ac584b792e8f1a5836ccfd75a3739d Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Fri, 21 Mar 2014 18:56:10 +0100 Subject: Fix system default font handling We didn't care about system default fonts and sizes, we just used the Qt default font. Due to how QFont is constructed, there was need to split font and font size. Signed-off-by: Anton Lundin Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'qt-ui') diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 8fd51a5b9..e77fa6b2c 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -645,8 +645,9 @@ void MainWindow::readSettings() { QSettings s; s.beginGroup("Display"); - QFont defaultFont = s.value("divelist_font", qApp->font()).value(); - defaultFont.setPointSizeF(s.value("font_size", qApp->font().pointSizeF()).toFloat()); + QFont defaultFont = QFont(default_prefs.divelist_font); + defaultFont = s.value("divelist_font", defaultFont).value(); + defaultFont.setPointSizeF(s.value("font_size", default_prefs.font_size).toFloat()); qApp->setFont(defaultFont); s.endGroup(); -- cgit v1.2.3-70-g09d2