diff options
| author | Mike Skec <skec@protonmail.ch> | 2021-02-13 13:57:35 +1100 |
|---|---|---|
| committer | Felix Queißner <felix@ib-queissner.de> | 2021-02-13 12:32:26 +0100 |
| commit | 19ac43503568ebc7fe4721f84292a11bbf7c2c2c (patch) | |
| tree | 4feaa078c614476ed0a4165da6eab5a1a1ca39bb /src/dialogs/settingsdialog.cpp | |
| parent | 496ea48de41e6c637c9fb3582216dbd9d8ee55c7 (diff) | |
| download | kristall-19ac43503568ebc7fe4721f84292a11bbf7c2c2c.tar.gz | |
Adds per-style pref for text width
Diffstat (limited to 'src/dialogs/settingsdialog.cpp')
| -rw-r--r-- | src/dialogs/settingsdialog.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/dialogs/settingsdialog.cpp b/src/dialogs/settingsdialog.cpp index 16c74aa..1bbdcf3 100644 --- a/src/dialogs/settingsdialog.cpp +++ b/src/dialogs/settingsdialog.cpp @@ -114,6 +114,10 @@ void SettingsDialog::setGeminiStyle(DocumentStyle const &style) this->ui->enable_justify_text->setChecked(this->current_style.justify_text); + this->ui->enable_text_width->setChecked(this->current_style.text_width_enabled); + + this->ui->text_width->setValue(this->current_style.text_width); + this->ui->line_height_p->setValue(this->current_style.line_height_p); this->ui->line_height_h->setValue(this->current_style.line_height_h); @@ -445,6 +449,17 @@ void SettingsDialog::on_enable_justify_text_clicked(bool checked) this->reloadStylePreview(); } +void SettingsDialog::on_enable_text_width_clicked(bool checked) +{ + this->current_style.text_width_enabled = checked; + this->ui->text_width->setEnabled(checked); +} + +void SettingsDialog::on_text_width_valueChanged(int value) +{ + this->current_style.text_width = value; +} + void SettingsDialog::on_line_height_p_valueChanged(double value) { this->current_style.line_height_p = value; |
