aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/widgets/PlainTextEditorPage.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2022-12-22 10:30:36 +0000
committerSaturneric <[email protected]>2022-12-22 10:30:36 +0000
commit3cb623b07e50d9e95dace9966dc0337e72f57dc2 (patch)
treedfe994f28f0a6dee6151febf3b50f22adceab74e /src/ui/widgets/PlainTextEditorPage.cpp
parentMerge pull request #70 from saturneric/dev/2.0.8/saturneric (diff)
parentfix: continue to solve ubuntu 18.04 build issues (diff)
downloadGpgFrontend-2.0.10.tar.gz
GpgFrontend-2.0.10.zip
fix: solve conflictsv2.0.10
Diffstat (limited to 'src/ui/widgets/PlainTextEditorPage.cpp')
-rw-r--r--src/ui/widgets/PlainTextEditorPage.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ui/widgets/PlainTextEditorPage.cpp b/src/ui/widgets/PlainTextEditorPage.cpp
index 7eb682cc..10e19b8b 100644
--- a/src/ui/widgets/PlainTextEditorPage.cpp
+++ b/src/ui/widgets/PlainTextEditorPage.cpp
@@ -34,6 +34,7 @@
#include "core/thread/FileReadTask.h"
#include "core/thread/Task.h"
#include "core/thread/TaskRunnerGetter.h"
+#include "ui/struct/SettingsObject.h"
#include "ui_PlainTextEditor.h"
namespace GpgFrontend::UI {
@@ -48,7 +49,13 @@ PlainTextEditorPage::PlainTextEditorPage(QString file_path, QWidget *parent)
ui_->loadingLabel->setHidden(true);
// Front in same width
- this->setFont({"Courier"});
+ SettingsObject general_settings_state("general_settings_state");
+
+ // font size
+ auto editor_font_size =
+ general_settings_state.Check("text_editor").Check("font_size", 10);
+ ui_->textPage->setFont(QFont("Courier", editor_font_size));
+
this->setAttribute(Qt::WA_DeleteOnClose);
this->ui_->characterLabel->setText(_("0 character"));