mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-31 00:09:58 -06:00
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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user