diff options
Diffstat (limited to 'src/dialogs/settingsdialog.cpp')
| -rw-r--r-- | src/dialogs/settingsdialog.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/dialogs/settingsdialog.cpp b/src/dialogs/settingsdialog.cpp index f441824..5283d47 100644 --- a/src/dialogs/settingsdialog.cpp +++ b/src/dialogs/settingsdialog.cpp @@ -43,6 +43,11 @@ SettingsDialog::SettingsDialog(QWidget *parent) : this->ui->ui_density->addItem(tr("Compact"), QVariant::fromValue<int>(int(UIDensity::compact))); this->ui->ui_density->addItem(tr("Classic"), QVariant::fromValue<int>(int(UIDensity::classic))); + this->ui->list_symbol->clear(); + this->ui->list_symbol->addItem("Filled circle", QVariant::fromValue<int>(int(QTextListFormat::Style::ListDisc))); + this->ui->list_symbol->addItem("Circle", QVariant::fromValue<int>(int(QTextListFormat::Style::ListCircle))); + this->ui->list_symbol->addItem("Square", QVariant::fromValue<int>(int(QTextListFormat::Style::ListSquare))); + setGeminiStyle(DocumentStyle { }); this->predefined_styles.clear(); @@ -132,6 +137,14 @@ void SettingsDialog::setGeminiStyle(DocumentStyle const &style) this->ui->indent_h->setValue(this->current_style.indent_h); this->ui->indent_l->setValue(this->current_style.indent_l); + this->ui->list_symbol->setCurrentIndex(0); + for(int i = 0; i < this->ui->list_symbol->count(); ++i) { + if(this->ui->list_symbol->itemData(i).toInt() == int(this->current_style.list_symbol)) { + this->ui->list_symbol->setCurrentIndex(i); + break; + } + } + auto setFontAndColor = [this](QLabel * label, const QFont &font, QColor color) { label->setText(formatFont(font)); @@ -539,6 +552,13 @@ void SettingsDialog::on_indent_l_valueChanged(int value) this->reloadStylePreview(); } +void SettingsDialog::on_list_symbol_currentIndexChanged(int index) +{ + if(index >= 0) { + current_style.list_symbol = QTextListFormat::Style(this->ui->list_symbol->itemData(index).toInt()); + reloadStylePreview(); + } +} void SettingsDialog::on_presets_currentIndexChanged(int index) { |
