diff options
| author | Felix (xq) Queißner <git@mq32.de> | 2021-03-08 02:02:05 +0100 |
|---|---|---|
| committer | Felix Queißner <felix@ib-queissner.de> | 2021-03-08 02:23:16 +0100 |
| commit | 8b1ddcddbf85473982afa8ba1d4f23063bb56a38 (patch) | |
| tree | 0edfcb2196a21b5c05f2e9e5cf8c0bc51cc78b0c /src/dialogs/settingsdialog.cpp | |
| parent | afd25186e03d0d8f35e526acb300a6e43ed6ce41 (diff) | |
| download | kristall-8b1ddcddbf85473982afa8ba1d4f23063bb56a38.tar.gz | |
Restructures option dialog even more, adds option to strip '<nav>' tags.
Diffstat (limited to 'src/dialogs/settingsdialog.cpp')
| -rw-r--r-- | src/dialogs/settingsdialog.cpp | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/dialogs/settingsdialog.cpp b/src/dialogs/settingsdialog.cpp index d71c23e..f6d4728 100644 --- a/src/dialogs/settingsdialog.cpp +++ b/src/dialogs/settingsdialog.cpp @@ -91,11 +91,12 @@ SettingsDialog::SettingsDialog(QWidget *parent) : this->ui->redirection_mode->addItem(tr("Ask for all redirection"), int(GenericSettings::WarnAlways)); this->ui->redirection_mode->addItem(tr("Silently redirect everything"), int(GenericSettings::WarnNever)); - connect(this->ui->tabWidget, &QTabWidget::currentChanged, this, [this] (int index) { - if (index != 1) /* Style tab */ + connect(this->ui->tab_control, &QTabWidget::currentChanged, this, [this] (int index) { + if (this->ui->tab_control->widget(index) != this->ui->style_tab) return; - this->ui->style_scroll_area->setMinimumWidth(this->ui->style_scroll_layout->minimumSize().width() + this->ui->style_scroll_area->setMinimumWidth( + this->ui->style_scroll_layout->minimumSize().width() + this->ui->style_scroll_area->verticalScrollBar()->sizeHint().width()); }); } @@ -318,6 +319,12 @@ void SettingsDialog::setOptions(const GenericSettings &options) this->ui->urlbarhl_none->setChecked(true); } + if(this->current_options.strip_nav) { + this->ui->strip_nav_on->setChecked(true); + } else { + this->ui->strip_nav_off->setChecked(true); + } + if (kristall::EMOJIS_SUPPORTED && this->current_options.emojis_enabled) { this->ui->emojis_on->setChecked(true); @@ -953,3 +960,13 @@ void SettingsDialog::on_enable_unlimited_cache_life_clicked(bool checked) this->current_options.cache_unlimited_life = checked; this->ui->cache_life->setEnabled(!checked); } + +void SettingsDialog::on_strip_nav_on_clicked() +{ + this->current_options.strip_nav = true; +} + +void SettingsDialog::on_strip_nav_off_clicked() +{ + this->current_options.strip_nav = false; +} |
