Fix font selection

.. should update when saved not restarted.
This commit is contained in:
Mark Liversedge
2014-06-13 18:10:48 +01:00
parent f9c87fbd0f
commit df245b84ea
2 changed files with 15 additions and 9 deletions

View File

@@ -182,11 +182,6 @@ MainWindow::MainWindow(const QDir &home)
appsettings->setValue(GC_FONT_CHARTLABELS_SIZE, app.labelFont);
appsettings->setValue(GC_FONT_CALENDAR_SIZE, app.calendarFont);
// set the default fontsize
QFont font;
font.setPointSize(app.defaultFont);
QApplication::setFont(font);
} else {
QRect appsize = geom.toRect();
@@ -1863,6 +1858,12 @@ MainWindow::configChanged()
tabbar->setPalette(tabbarPalette);
#endif
// set the default fontsize
QFont font;
font.fromString(appsettings->value(NULL, GC_FONT_DEFAULT, QFont().toString()).toString());
font.setPointSize(appsettings->value(NULL, GC_FONT_DEFAULT_SIZE, 10).toInt());
QApplication::setFont(font); // set default font
head->updateGeometry();
repaint();