diff options
| author | Karol Kosek <krkk@krkk.ct8.pl> | 2020-12-30 15:45:03 +0100 |
|---|---|---|
| committer | Felix Queißner <felix@ib-queissner.de> | 2020-12-30 20:31:39 +0100 |
| commit | 07a4ddc230c11c7249acd4c0363c6075e939f11b (patch) | |
| tree | e6330578c94bedfdc9b552cecbc8a874cc2713b9 /src/dialogs/settingsdialog.cpp | |
| parent | 80f64ff08cb3234c124cee786118c8e356942922 (diff) | |
| download | kristall-07a4ddc230c11c7249acd4c0363c6075e939f11b.tar.gz | |
Use multi-arg overload to save memory allocations
Diffstat (limited to 'src/dialogs/settingsdialog.cpp')
| -rw-r--r-- | src/dialogs/settingsdialog.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/dialogs/settingsdialog.cpp b/src/dialogs/settingsdialog.cpp index 269a0bd..8a319d2 100644 --- a/src/dialogs/settingsdialog.cpp +++ b/src/dialogs/settingsdialog.cpp @@ -109,29 +109,23 @@ void SettingsDialog::setGeminiStyle(DocumentStyle const &style) { label->setText(formatFont(font)); label->setStyleSheet(COLOR_STYLE - .arg(this->current_style.background_color.name()) - .arg(color.name())); + .arg(this->current_style.background_color.name(), color.name())); }; ui->bg_preview->setStyleSheet(COLOR_STYLE - .arg(this->current_style.background_color.name()) - .arg("#FF00FF")); + .arg(this->current_style.background_color.name(), "#FF00FF")); ui->quote_preview->setStyleSheet(COLOR_STYLE - .arg(this->current_style.blockquote_color.name()) - .arg("#FF00FF")); + .arg(this->current_style.blockquote_color.name(), "#FF00FF")); ui->link_local_preview->setStyleSheet(COLOR_STYLE - .arg(this->current_style.background_color.name()) - .arg(this->current_style.internal_link_color.name())); + .arg(this->current_style.background_color.name(), this->current_style.internal_link_color.name())); ui->link_foreign_preview->setStyleSheet(COLOR_STYLE - .arg(this->current_style.background_color.name()) - .arg(this->current_style.external_link_color.name())); + .arg(this->current_style.background_color.name(), this->current_style.external_link_color.name())); ui->link_cross_preview->setStyleSheet(COLOR_STYLE - .arg(this->current_style.background_color.name()) - .arg(this->current_style.cross_scheme_link_color.name())); + .arg(this->current_style.background_color.name(), this->current_style.cross_scheme_link_color.name())); setFontAndColor(this->ui->std_preview, this->current_style.standard_font, this->current_style.standard_color); setFontAndColor(this->ui->pre_preview, this->current_style.preformatted_font, this->current_style.preformatted_color); |
