aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/widgets/PlainTextEditorPage.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-01-15 09:22:32 +0000
committersaturneric <[email protected]>2024-01-15 09:22:32 +0000
commit6c632d70b391f8b317c68f7db8cfd217f9370995 (patch)
tree4136eb7164d9f910527c0392d12bd4854a2fdcff /src/ui/widgets/PlainTextEditorPage.cpp
parentrefactor: remove boost and use QString instead of std::filesystem::path (diff)
downloadGpgFrontend-6c632d70b391f8b317c68f7db8cfd217f9370995.tar.gz
GpgFrontend-6c632d70b391f8b317c68f7db8cfd217f9370995.zip
feat: use qt json support components in data object and infos gathering module
Diffstat (limited to '')
-rw-r--r--src/ui/widgets/PlainTextEditorPage.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/ui/widgets/PlainTextEditorPage.cpp b/src/ui/widgets/PlainTextEditorPage.cpp
index 0a4d9d1a..1a6978fe 100644
--- a/src/ui/widgets/PlainTextEditorPage.cpp
+++ b/src/ui/widgets/PlainTextEditorPage.cpp
@@ -28,8 +28,6 @@
#include "PlainTextEditorPage.h"
-#include <sstream>
-#include <string>
#include <utility>
#include "core/function/CharsetOperator.h"
@@ -37,6 +35,7 @@
#include "core/thread/Task.h"
#include "core/thread/TaskRunnerGetter.h"
#include "ui/struct/SettingsObject.h"
+#include "ui/struct/settings/AppearanceSO.h"
#include "ui_PlainTextEditor.h"
namespace GpgFrontend::UI {
@@ -50,13 +49,9 @@ PlainTextEditorPage::PlainTextEditorPage(QString file_path, QWidget *parent)
ui_->textPage->setFocus();
ui_->loadingLabel->setHidden(true);
- // Front in same width
- 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));
+ AppearanceSO appearance(SettingsObject("general_settings_state"));
+ ui_->textPage->setFont(QFont("Courier", appearance.text_editor_font_size));
this->setAttribute(Qt::WA_DeleteOnClose);