mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-31 00:09:58 -06:00
Preview for the Data Browser font in Preferences
The 'Displayed text' boxes preview now the Data Browser font that the user sets in the corresponding widgets. See issue #1263
This commit is contained in:
@@ -29,6 +29,9 @@ PreferencesDialog::PreferencesDialog(QWidget* parent)
|
||||
ui->fr_null_bg->installEventFilter(this);
|
||||
ui->fr_null_fg->installEventFilter(this);
|
||||
|
||||
connect(ui->comboDataBrowserFont, SIGNAL(currentIndexChanged(int)), this, SLOT(updatePreviewFont()));
|
||||
connect(ui->spinDataBrowserFontSize, SIGNAL(valueChanged(int)), this, SLOT(updatePreviewFont()));
|
||||
|
||||
#ifndef CHECKNEWVERSION
|
||||
ui->labelUpdates->setVisible(false);
|
||||
ui->checkUpdates->setVisible(false);
|
||||
@@ -546,3 +549,13 @@ void PreferencesDialog::chooseRemoteCloneDirectory()
|
||||
if(!s.isEmpty())
|
||||
ui->editRemoteCloneDirectory->setText(s);
|
||||
}
|
||||
|
||||
void PreferencesDialog::updatePreviewFont()
|
||||
{
|
||||
QFont textFont(ui->comboDataBrowserFont->currentText());
|
||||
textFont.setPointSize(ui->spinDataBrowserFontSize->value());
|
||||
ui->txtRegular->setFont(textFont);
|
||||
textFont.setItalic(true);
|
||||
ui->txtNull->setFont(textFont);
|
||||
ui->txtBlob->setFont(textFont);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user