Skip to content

Commit

Permalink
Github Issue #39: Adding missing changes from the previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
AngryFender committed Feb 17, 2024
1 parent 9989b1c commit 135c384
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions mkedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,22 @@ void MkEdit::setDocument(QTextDocument *document)
connectSignals();
}

void MkEdit::setFont(const QFont &font)
{
QFont menuFont = font;
menuFont.setPointSize(10);
undoAction.setFont(menuFont);
redoAction.setFont(menuFont);
copyTextAction.setFont(menuFont);
pasteTextAction.setFont(menuFont);
deleteTextAction.setFont(menuFont);
selectAllAction.setFont(menuFont);
selectBlockAction.setFont(menuFont);
disableMarkdown.setFont(menuFont);

QTextEdit::setFont(font);
}

void MkEdit::scrollValueUpdateHandle(int value)
{
int currentBlockNumber = textCursor().blockNumber();
Expand Down
2 changes: 1 addition & 1 deletion mkedit.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class MkEdit : public QTextEdit
void setKeywordColor(const QColor& color);

void setDocument(QTextDocument *document);

void setFont(const QFont &font);

protected:
void insertFromMimeData(const QMimeData *source) override;
Expand Down

0 comments on commit 135c384

Please sign in to comment.