summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Danilo Cesar Lemes de Paula <danilo.eu@gmail.com>2014-02-26 16:33:27 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-26 11:51:33 -0800
commit5846ff972d6624b017e5deb0d279c21a497ed229 (patch)
tree17f63e479b972ee1c9e8883e47b602877894217d /qt-ui
parent30b25d1212517532db91903828579ab4cb63b06c (diff)
downloadsubsurface-5846ff972d6624b017e5deb0d279c21a497ed229.tar.gz
Fixing default font on preference window
Default font was hardcoded as 14. What happen if you change any other preference value is that the application would start to use fontSize=14. This commit loads the right value in the QDoubleSpinBox Signed-off-by: Danilo Cesar Lemes de Paula <danilo.eu@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/preferences.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp
index 01f1815c2..c1c03e829 100644
--- a/qt-ui/preferences.cpp
+++ b/qt-ui/preferences.cpp
@@ -278,8 +278,11 @@ void PreferencesDialog::loadSettings()
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);
+ if (prefs.font_size < 0)
+ prefs.font_size = defaultFont.pointSizeF();
GET_INT("displayinvalid", display_invalid_dives);
s.endGroup();
}