Make Data Browser font and font size configurable

See issue #383.

Also delete the custom styling sheets for the Data Browser tab in the
Preferences Dialog - no need to have these group boxes look differently
from all the others.
This commit is contained in:
Martin Kleusberg
2015-08-23 18:17:25 +02:00
parent e833e49130
commit a8c52eba12
3 changed files with 63 additions and 95 deletions

View File

@@ -62,6 +62,8 @@ void PreferencesDialog::loadSettings()
ui->foreignKeysCheckBox->setChecked(getSettingsValue("db", "foreignkeys").toBool());
ui->spinPrefetchSize->setValue(getSettingsValue("db", "prefetchsize").toInt());
ui->comboDataBrowserFont->setCurrentIndex(ui->comboEditorFont->findText(getSettingsValue("databrowser", "font").toString()));
ui->spinDataBrowserFontSize->setValue(getSettingsValue("databrowser", "fontsize").toInt());
loadColorSetting(ui->fr_null_fg, "null_fg");
loadColorSetting(ui->fr_null_bg, "null_bg");
loadColorSetting(ui->fr_reg_fg, "reg_fg");
@@ -108,6 +110,8 @@ void PreferencesDialog::saveSettings()
setSettingsValue("checkversion", "enabled", ui->checkUpdates->isChecked());
setSettingsValue("databrowser", "font", ui->comboDataBrowserFont->currentText());
setSettingsValue("databrowser", "fontsize", ui->spinDataBrowserFontSize->value());
saveColorSetting(ui->fr_null_fg, "null_fg");
saveColorSetting(ui->fr_null_bg, "null_bg");
saveColorSetting(ui->fr_reg_fg, "reg_fg");
@@ -240,6 +244,10 @@ QVariant PreferencesDialog::getSettingsDefaultValue(const QString& group, const
// Data Browser/NULL Fields
if(group == "databrowser")
{
if(name == "font")
return "Sans Serif";
if(name == "fontsize")
return 10;
if (name == "null_text")
return "NULL";
if (name == "null_fg_colour")