From 135c38426eaa20acf87a204e016f6f2aa2ae1477 Mon Sep 17 00:00:00 2001 From: AngryFender Date: Sat, 17 Feb 2024 17:32:17 +0000 Subject: [PATCH] Github Issue #39: Adding missing changes from the previous commit --- mkedit.cpp | 16 ++++++++++++++++ mkedit.h | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/mkedit.cpp b/mkedit.cpp index 6045960..af2127d 100644 --- a/mkedit.cpp +++ b/mkedit.cpp @@ -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(); diff --git a/mkedit.h b/mkedit.h index 3d8d22f..633741b 100644 --- a/mkedit.h +++ b/mkedit.h @@ -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;