From 07a4ddc230c11c7249acd4c0363c6075e939f11b Mon Sep 17 00:00:00 2001 From: Karol Kosek Date: Wed, 30 Dec 2020 15:45:03 +0100 Subject: Use multi-arg overload to save memory allocations --- src/dialogs/settingsdialog.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'src/dialogs/settingsdialog.cpp') 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); -- cgit v1.2.3