Commit aa9f6ccc authored by Kurt Hindenburg's avatar Kurt Hindenburg
Browse files

Change the font dialog's sample text for terminal usage.

Use the code provided by Thomas Lübking in
https://git.reviewboard.kde.org/r/103357/ to change the font dialog's
sample text.  Since the text entry is large I added a lot of text
that some fonts may appears too similiar in the terminal.
parent 29b589ba
......@@ -1221,11 +1221,24 @@ void EditProfileDialog::fontSelected(const QFont& font)
}
void EditProfileDialog::showFontDialog()
{
QString sampleText = QString("ell 'lL', one '1', little eye 'i', big eye");
sampleText += QString("'I', lL1iI, Zero '0', little oh 'o', big oh 'O', 0oO");
sampleText += QString("`~!@#$%^&*()_+-=[]\{}|:\";'<>?,./");
sampleText += QString("0123456789");
sampleText += QString("\nThe Quick Brown Fox Jumps Over The Lazy Dog\n");
sampleText += i18n("--- Type anything in this box ---");
QFont currentFont = _ui->fontPreviewLabel->font();
QWeakPointer<KFontDialog> dialog = new KFontDialog(this, KFontChooser::FixedFontsOnly);
dialog.data()->setFont(currentFont, true);
// TODO (hindenburg): When https://git.reviewboard.kde.org/r/103357 is
// committed, change the below.
// Use text more fitting to show font differences in a terminal
QList<KFontChooser*> chooserList = dialog.data()->findChildren<KFontChooser*>();
if (!chooserList.isEmpty())
chooserList.at(0)->setSampleText(sampleText);
connect(dialog.data(), SIGNAL(fontSelected(QFont)), this, SLOT(fontSelected(QFont)));
if (dialog.data()->exec() == QDialog::Rejected)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment