diff options
author | Saturneric <[email protected]> | 2022-09-03 12:11:36 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2022-09-03 12:11:36 +0000 |
commit | 4201e3d55cc3bd467c2e49f694a445744f9af93f (patch) | |
tree | 281aa2ad51b2753d6295e821a14d8b1737484855 /src/ui/widgets/PlainTextEditorPage.cpp | |
parent | feat(project): support freebsd build (diff) | |
download | GpgFrontend-4201e3d55cc3bd467c2e49f694a445744f9af93f.tar.gz GpgFrontend-4201e3d55cc3bd467c2e49f694a445744f9af93f.zip |
fix(ui): fix user feedback issues.
1. add the font size settings of text editor.
2. fix exception under Russia lang when doing verification.
Diffstat (limited to 'src/ui/widgets/PlainTextEditorPage.cpp')
-rw-r--r-- | src/ui/widgets/PlainTextEditorPage.cpp | 9 |
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")); |