mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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>
This commit is contained in:
parent
2f05934936
commit
77c2c4c5ad
2 changed files with 5 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -93,7 +93,7 @@ void PreferencesDialog::setUiFromPrefs()
|
|||
ui.kg->setChecked(prefs.units.weight == units::KG);
|
||||
ui.lbs->setChecked(prefs.units.weight == units::LBS);
|
||||
|
||||
ui.font->setFont(QString(prefs.divelist_font));
|
||||
ui.font->setCurrentFont(QString(prefs.divelist_font));
|
||||
ui.fontsize->setValue(prefs.font_size);
|
||||
ui.defaultfilename->setText(prefs.default_filename);
|
||||
ui.default_cylinder->clear();
|
||||
|
@ -182,7 +182,7 @@ void PreferencesDialog::syncSettings()
|
|||
s.endGroup();
|
||||
|
||||
s.beginGroup("Display");
|
||||
s.setValue("divelist_font", ui.font->font().family());
|
||||
s.setValue("divelist_font", ui.font->currentFont());
|
||||
s.setValue("font_size", ui.fontsize->value());
|
||||
s.setValue("displayinvalid", ui.displayinvalid->isChecked());
|
||||
s.endGroup();
|
||||
|
|
Loading…
Reference in a new issue