Since QFont style hints won't work on X11, we force the font to fixed pitch if the family isn't set

felipesanches-svg
Marius Kintel 2011-12-29 15:24:38 +01:00
parent 3487d31055
commit 211095d661
1 changed files with 1 additions and 0 deletions

View File

@ -1801,6 +1801,7 @@ void MainWindow::setFont(const QString &family, uint size)
{
QFont font;
if (!family.isEmpty()) font.setFamily(family);
else font.setFixedPitch(true);
if (size > 0) font.setPointSize(size);
font.setStyleHint(QFont::TypeWriter);
editor->setFont(font);