implement setFont() method that sets the font for the entire editor window

This commit is contained in:
Axel Kohlmeyer
2023-08-24 21:25:14 -04:00
parent c7a0e5f0e1
commit 3a7efdfb8c
3 changed files with 9 additions and 1 deletions

View File

@ -88,6 +88,12 @@ int CodeEditor::lineNumberAreaWidth()
return space;
}
void CodeEditor::setFont(const QFont &newfont)
{
lineNumberArea->setFont(newfont);
document()->setDefaultFont(newfont);
}
void CodeEditor::updateLineNumberAreaWidth(int /* newBlockCount */)
{
setViewportMargins(lineNumberAreaWidth(), 0, 0, 0);