From 010281aa7280e652f0b9381c2678d23a77eb491f Mon Sep 17 00:00:00 2001 From: Julien Date: Wed, 1 May 2024 22:57:33 +0200 Subject: [PATCH 1/2] fix(ui): connect auto preview to txt_body too --- qtribu/gui/form_rdp_news.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qtribu/gui/form_rdp_news.py b/qtribu/gui/form_rdp_news.py index dd07b67a..8efad8da 100644 --- a/qtribu/gui/form_rdp_news.py +++ b/qtribu/gui/form_rdp_news.py @@ -77,6 +77,8 @@ def __init__(self, parent: Optional[QWidget] = None): self.btn_preview.clicked.connect(self.generate_preview) self.txt_preview.setStyleSheet("background-color:transparent;") + self.txt_body.textChanged.connect(self.auto_preview) + # publication self.chb_license.setChecked( self.plg_settings.get_value_from_key( From ea039b0c77f682c446248265f9a8f71d60b9cd94 Mon Sep 17 00:00:00 2001 From: Julien Date: Wed, 1 May 2024 22:58:21 +0200 Subject: [PATCH 2/2] improve(forms): improve forms comment --- qtribu/gui/form_article.py | 2 +- qtribu/gui/form_rdp_news.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qtribu/gui/form_article.py b/qtribu/gui/form_article.py index a0ac3262..4ea8b88a 100644 --- a/qtribu/gui/form_article.py +++ b/qtribu/gui/form_article.py @@ -161,7 +161,7 @@ def on_btn_submit(self) -> Union[bool, str, None]: f"&in_art_date={self.dte_proposed_date.date().toString('dd/MM/yyyy')}" f"&tx_art_content={self.txt_description.toPlainText()}" f"&tx_misc_comment={self.txt_comment.toPlainText()} " - f"\n---\n\n{__title__} {__version__}" + "\n---\n\n" + self.tr("Prefilled with ") + f"{__title__} {__version__}" f"&title=[Proposition] {self.lne_title.text()} - {__title__} {__version__}" ) self.log(message=f"Opening issue form: {completed_url}", log_level=4) diff --git a/qtribu/gui/form_rdp_news.py b/qtribu/gui/form_rdp_news.py index 8efad8da..541b7527 100644 --- a/qtribu/gui/form_rdp_news.py +++ b/qtribu/gui/form_rdp_news.py @@ -75,7 +75,7 @@ def __init__(self, parent: Optional[QWidget] = None): QIcon(QgsApplication.iconPath("mActionShowAllLayersGray.svg")) ) self.btn_preview.clicked.connect(self.generate_preview) - self.txt_preview.setStyleSheet("background-color:transparent;") + self.txt_preview.setStyleSheet("background-color: #DCDCDC;") self.txt_body.textChanged.connect(self.auto_preview) @@ -272,7 +272,7 @@ def on_btn_submit(self) -> Union[bool, str, None]: f"&in_news_icon={self.cbb_icon.currentText()}" f"&tx_news_content={self.txt_body.toPlainText()}" f"&tx_misc_comment={self.txt_comment.toPlainText()} " - f"\n---\n\n{__title__} {__version__}" + "\n---\n\n" + self.tr("Prefilled with ") + f"{__title__} {__version__}" f"&title=[GeoRDP] {self.lne_title.text()} - {__title__} {__version__}" ) self.log(message=f"Opening issue form: {completed_url}", log_level=4)