Skip to content

Commit

Permalink
feat: Use monospace as default font; monospace only in preferences
Browse files Browse the repository at this point in the history
1. Use monospace as the default font.

2. Now only monospace fonts will be displayed in the font selection
   window.

This suggestion is from @arpit in Telegram group.

> One suggestion please keep Monospace or any other font which provides
> good indentation. Even in my college many students deleted your
> editorjust because of that formatting problem because of default Sans
> Serif font.
  • Loading branch information
ouuan committed Feb 6, 2020
1 parent 6f42141 commit 6436e41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Core/SettingsManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ QString SettingManager::getTemplatePathPython()
}
QString SettingManager::getFont()
{
return mSettings->value("font", "").toString();
return mSettings->value("font", "monospace").toString();
}

QRect SettingManager::getGeometry()
Expand Down
2 changes: 1 addition & 1 deletion src/preferencewindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ void PreferenceWindow::on_hotkeys_clicked(bool checked)
void PreferenceWindow::on_font_button_clicked()
{
bool ok = false;
QFont fp = QFontDialog::getFont(&ok, currentFont);
QFont fp = QFontDialog::getFont(&ok, currentFont, this, "Choose a font", QFontDialog::MonospacedFonts);

if (ok)
{
Expand Down

0 comments on commit 6436e41

Please sign in to comment.