aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/widgets')
-rw-r--r--src/ui/widgets/InfoBoardWidget.cpp6
-rw-r--r--src/ui/widgets/KeyList.cpp11
-rw-r--r--src/ui/widgets/PlainTextEditorPage.cpp9
-rw-r--r--src/ui/widgets/PlainTextEditorPage.h2
4 files changed, 16 insertions, 12 deletions
diff --git a/src/ui/widgets/InfoBoardWidget.cpp b/src/ui/widgets/InfoBoardWidget.cpp
index 264a67d1..74ead2ce 100644
--- a/src/ui/widgets/InfoBoardWidget.cpp
+++ b/src/ui/widgets/InfoBoardWidget.cpp
@@ -79,11 +79,13 @@ void InfoBoardWidget::SetInfoBoard(const QString& text,
status.setColor(QPalette::Text, color);
ui_->infoBoard->setPalette(status);
- SettingsObject main_windows_state("main_windows_state");
+ SettingsObject general_settings_state("general_settings_state");
// info board font size
- auto info_font_size = main_windows_state.Check("info_font_size", 10);
+ auto info_font_size =
+ general_settings_state.Check("text_editor").Check("font_size", 10);
ui_->infoBoard->setFont(QFont("Times", info_font_size));
+
}
void InfoBoardWidget::SlotRefresh(const QString& text, InfoBoardStatus status) {
diff --git a/src/ui/widgets/KeyList.cpp b/src/ui/widgets/KeyList.cpp
index 0bd65f25..9150d580 100644
--- a/src/ui/widgets/KeyList.cpp
+++ b/src/ui/widgets/KeyList.cpp
@@ -158,7 +158,7 @@ void KeyList::AddListGroupTab(
}
void KeyList::SlotRefresh() {
- LOG(INFO) << _("Called") << "address" << this;
+ LOG(INFO) << _("called") << "address" << this;
ui_->refreshKeyListButton->setDisabled(true);
ui_->syncButton->setDisabled(true);
@@ -442,6 +442,8 @@ void KeyList::slot_sync_with_key_server() {
}
}
+ if (key_ids.empty()) return;
+
ui_->refreshKeyListButton->setDisabled(true);
ui_->syncButton->setDisabled(true);
@@ -496,7 +498,6 @@ void KeyList::check_all() {
}
KeyIdArgsListPtr& KeyTable::GetChecked() {
- LOG(INFO) << "called";
if (checked_key_ids_ == nullptr)
checked_key_ids_ = std::make_unique<KeyIdArgsList>();
auto& ret = checked_key_ids_;
@@ -517,8 +518,6 @@ void KeyTable::SetChecked(KeyIdArgsListPtr key_ids) {
}
void KeyTable::Refresh(KeyLinkListPtr m_keys) {
- LOG(INFO) << "called";
-
auto& checked_key_list = GetChecked();
// while filling the table, sort enabled causes errors
@@ -532,7 +531,6 @@ void KeyTable::Refresh(KeyLinkListPtr m_keys) {
else
keys = std::move(m_keys);
- LOG(INFO) << "keys size: " << keys->size();
auto it = keys->begin();
int row_count = 0;
@@ -553,7 +551,6 @@ void KeyTable::Refresh(KeyLinkListPtr m_keys) {
it++;
}
- LOG(INFO) << "row_count: " << row_count;
key_list_->setRowCount(row_count);
int row_index = 0;
@@ -645,8 +642,6 @@ void KeyTable::Refresh(KeyLinkListPtr m_keys) {
}
}
}
-
- LOG(INFO) << "End";
}
void KeyTable::UncheckALL() const {
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"));
diff --git a/src/ui/widgets/PlainTextEditorPage.h b/src/ui/widgets/PlainTextEditorPage.h
index e5c1c89d..ffa31762 100644
--- a/src/ui/widgets/PlainTextEditorPage.h
+++ b/src/ui/widgets/PlainTextEditorPage.h
@@ -129,7 +129,7 @@ class PlainTextEditorPage : public QWidget {
size_t read_bytes_ = 0; ///<
std::string charset_name_; ///<
std::string language_name_; ///<
- int32_t charset_confidence_; ///<
+ int32_t charset_confidence_{}; ///<
bool is_crlf_ = false; ///<
/**