From 77c2c4c5adbc13ac72b5e6c18546187fd43396f2 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Wed, 18 Dec 2013 19:06:51 -0200 Subject: Make default font setting actually work We were asking the widget.font() which returned the font that the QFontSelector uses to display it's contents, instead of using currentFont() that's the correctly selected font. duh. :)) Fixes #368 Fixes #375 (for #375 the solution is to select a different font that a) looks better and b) has the missing characters) Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qt-ui/mainwindow.cpp') diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index f4f97f92d..36fa71d73 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -677,6 +677,9 @@ void MainWindow::readSettings() s.endGroup(); s.beginGroup("Display"); + QFont defaultFont = s.value("divelist_font", qApp->font()).value(); + defaultFont.setPointSizeF(s.value("font_size", qApp->font().pointSizeF()).toFloat()); + qApp->setFont(defaultFont); GET_TXT("divelist_font", divelist_font); GET_INT("font_size", font_size); GET_INT("displayinvalid", display_invalid_dives); -- cgit v1.2.3-70-g09d2