aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-12-18 19:06:51 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-18 13:38:40 -0800
commit77c2c4c5adbc13ac72b5e6c18546187fd43396f2 (patch)
tree58416a545c544fde43ef3c1c9772a06b09c4ba00 /qt-ui/mainwindow.cpp
parent2f05934936941f4b0229f2bd9822bd9933dea219 (diff)
downloadsubsurface-77c2c4c5adbc13ac72b5e6c18546187fd43396f2.tar.gz
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 <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp3
1 files changed, 3 insertions, 0 deletions
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<QFont>();
+ 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);