From 4135e0d368a8181b7422338559bdcd3b214443c4 Mon Sep 17 00:00:00 2001 From: Mike Skec Date: Tue, 16 Feb 2021 09:56:14 +1100 Subject: Improved blockquotes --- src/dialogs/settingsdialog.cpp | 15 +++++- src/dialogs/settingsdialog.hpp | 4 ++ src/dialogs/settingsdialog.ui | 112 ++++++++++++++++++++++++++++++----------- 3 files changed, 100 insertions(+), 31 deletions(-) (limited to 'src/dialogs') diff --git a/src/dialogs/settingsdialog.cpp b/src/dialogs/settingsdialog.cpp index a7b08e8..36e4291 100644 --- a/src/dialogs/settingsdialog.cpp +++ b/src/dialogs/settingsdialog.cpp @@ -138,7 +138,7 @@ void SettingsDialog::setGeminiStyle(DocumentStyle const &style) .arg(this->current_style.background_color.name(), "#FF00FF")); ui->quote_preview->setStyleSheet(COLOR_STYLE - .arg(this->current_style.blockquote_color.name(), "#FF00FF")); + .arg(this->current_style.blockquote_bgcolor.name(), "#FF00FF")); ui->link_local_preview->setStyleSheet(COLOR_STYLE .arg(this->current_style.background_color.name(), this->current_style.internal_link_color.name())); @@ -154,6 +154,7 @@ void SettingsDialog::setGeminiStyle(DocumentStyle const &style) setFontAndColor(this->ui->h1_preview, this->current_style.h1_font, this->current_style.h1_color); setFontAndColor(this->ui->h2_preview, this->current_style.h2_font, this->current_style.h2_color); setFontAndColor(this->ui->h3_preview, this->current_style.h3_font, this->current_style.h3_color); + setFontAndColor(this->ui->bq_preview, this->current_style.blockquote_font, this->current_style.blockquote_fgcolor); this->reloadStylePreview(); } @@ -359,6 +360,11 @@ void SettingsDialog::on_h3_change_font_clicked() updateFont(current_style.h3_font); } +void SettingsDialog::on_bq_change_font_clicked() +{ + updateFont(current_style.blockquote_font); +} + void SettingsDialog::updateColor(QColor &input) { QColorDialog dialog { this }; @@ -396,6 +402,11 @@ void SettingsDialog::on_h3_change_color_clicked() updateColor(current_style.h3_color); } +void SettingsDialog::on_bq_change_color_clicked() +{ + updateColor(current_style.blockquote_fgcolor); +} + void SettingsDialog::on_bg_change_color_clicked() { updateColor(current_style.background_color); @@ -417,7 +428,7 @@ void SettingsDialog::on_link_cross_change_color_clicked() } void SettingsDialog::on_quote_change_color_clicked() { - updateColor(current_style.blockquote_color); + updateColor(current_style.blockquote_bgcolor); } void SettingsDialog::on_link_local_prefix_textChanged(const QString &text) diff --git a/src/dialogs/settingsdialog.hpp b/src/dialogs/settingsdialog.hpp index 748d118..cc7c302 100644 --- a/src/dialogs/settingsdialog.hpp +++ b/src/dialogs/settingsdialog.hpp @@ -50,6 +50,8 @@ private slots: void on_h3_change_font_clicked(); + void on_bq_change_font_clicked(); + void on_std_change_color_clicked(); void on_pre_change_color_clicked(); @@ -60,6 +62,8 @@ private slots: void on_h3_change_color_clicked(); + void on_bq_change_color_clicked(); + void on_bg_change_color_clicked(); void on_link_local_change_color_clicked(); diff --git a/src/dialogs/settingsdialog.ui b/src/dialogs/settingsdialog.ui index 9968af8..56bbcaf 100644 --- a/src/dialogs/settingsdialog.ui +++ b/src/dialogs/settingsdialog.ui @@ -723,6 +723,7 @@ + @@ -772,56 +773,107 @@ + + + + Blockquote font + + + + + + + + + border: 1px solid black; + + + QFrame::NoFrame + + + This font will be used in blockquotes. + + + Qt::PlainText + + + + + + + + + + + .. + + + + + + + + + + + .. + + + + + + + Local Link Color - + Foreign Link Color - + Cross-Scheme-Color - + Local Link Prefix - + Extern Link Prefix - + - + - + @@ -846,7 +898,7 @@ - + @@ -871,7 +923,7 @@ - + @@ -896,25 +948,25 @@ - + Auto-Theme Generation - + - + Left/right Page Margin - + px @@ -928,14 +980,14 @@ - + Top/bottom Page Margin - + px @@ -949,14 +1001,14 @@ - + Other options - + @@ -981,7 +1033,7 @@ - + Text width limit @@ -991,7 +1043,7 @@ - + 300 @@ -1008,14 +1060,14 @@ - + Line height (paragraph) - + px @@ -1029,14 +1081,14 @@ - + Line height (header) - + px @@ -1050,14 +1102,14 @@ - + Indentation - + @@ -1147,14 +1199,14 @@ - + Presets - + @@ -1230,14 +1282,14 @@ - + Block Quote Background - + @@ -1374,6 +1426,8 @@ h2_change_color h3_change_font h3_change_color + bq_change_font + bq_change_color link_local_change_color link_foreign_change_color link_cross_change_color -- cgit v1.2.3