View Issue Details

IDProjectCategoryView StatusLast Update
0017747ScribusUser Interfacepublic2026-02-11 09:38
ReporterYtterX Assigned To 
PrioritylowSeverityfeatureReproducibilityalways
Status newResolutionopen 
Product Version1.7.3.svn 
Summary0017747: Adding image to show image before effects are applied
DescriptionWhen opening the Effect Dialog I noticed that there was no preview of the image before effects are applied.
As this can be quite useful to see the differences when applying effects.
Additional InformationI also set some row stretch and column stretch settings to better support resizing the dialog.
I was also thinking to migrate the c++ style to a .ui file as other dialogs have that.
Please let me know if other layouts are preferred or if a more total overhaul of the dialog would be better.
I have more ideas for improvements but like to start with this one (.ui file, bigger previews, perhaps preview of the effect before the current selected effect).
TagsNo tags attached.
Attached Files
master...ytterx_scribus_effectsdialog-adding-before-image.patch (6,156 bytes)   
From fba758428d4fdb4e7098927343ad677882253267 Mon Sep 17 00:00:00 2001
From: ytterx <5389801+ytterx@users.noreply.github.com>
Date: Wed, 11 Feb 2026 10:09:29 +0100
Subject: [PATCH] Adding label to show image before the effects are applied

---
 scribus/ui/effectsdialog.cpp | 79 +++++++++++++++++++++++-------------
 scribus/ui/effectsdialog.h   |  4 ++
 2 files changed, 54 insertions(+), 29 deletions(-)

diff --git a/scribus/ui/effectsdialog.cpp b/scribus/ui/effectsdialog.cpp
index 750aae2d99..99e43cc3db 100644
--- a/scribus/ui/effectsdialog.cpp
+++ b/scribus/ui/effectsdialog.cpp
@@ -82,6 +82,15 @@ EffectsDialog::EffectsDialog( QWidget* parent, PageItem* item, ScribusDoc* docc
 
 	textLabel5 = new QLabel( this );
 	textLabel5->setText( tr( "Preview" ) );
+	textLabel16 = new QLabel( this );
+	textLabel16->setText( tr("Before effects") );
+	pixmapLabel2 = new QLabel( this );
+	pixmapLabel2->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+	pixmapLabel2->setMinimumSize( QSize( 220, 220 ) );
+	pixmapLabel2->setMaximumSize( QSize( 220, 220 ) );
+	pixmapLabel2->setFrameShape( QLabel::StyledPanel );
+	pixmapLabel2->setFrameShadow( QLabel::Sunken );
+	pixmapLabel2->setScaledContents( false );
 	pixmapLabel1 = new QLabel( this );
 	pixmapLabel1->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
 	pixmapLabel1->setMinimumSize( QSize( 220, 220 ) );
@@ -604,13 +613,23 @@ EffectsDialog::EffectsDialog( QWidget* parent, PageItem* item, ScribusDoc* docc
 
 	layoutGrid->addWidget(textLabel1,       0, 0, 1, 1);
 	layoutGrid->addWidget(textLabel2,       0, 1, 1, 1);
-	layoutGrid->addWidget(textLabel5,       0, 2, 1, 1);
+	layoutGrid->addWidget(textLabel16,      0, 2, 1, 1);
+	layoutGrid->addWidget(textLabel5,       0, 3, 1, 1);
 	layoutGrid->addWidget(availableEffects, 1, 0, 2, 1);
 	layoutGrid->addWidget(usedEffects,      1, 1, 2, 1);
-	layoutGrid->addWidget(pixmapLabel1,     1, 2, 1, 1);
-	layoutGrid->addWidget(groupBox,         2, 2, 2, 1);
+	layoutGrid->addWidget(pixmapLabel2,     1, 2, 1, 1);
+	layoutGrid->addWidget(pixmapLabel1,     1, 3, 1, 1);
+	layoutGrid->addWidget(groupBox,         2, 2, 2, 2);
 	layoutGrid->addWidget(toEffects,        3, 0, 1, 1);
 	layoutGrid->addLayout(layout7,          3, 1, 1, 1);
+	layoutGrid->setRowStretch(0, 0);
+	layoutGrid->setRowStretch(1, 1);
+	layoutGrid->setRowStretch(2, 1);
+	layoutGrid->setRowStretch(3, 0);
+	layoutGrid->setColumnStretch(0, 2);
+	layoutGrid->setColumnStretch(1, 2);
+	layoutGrid->setColumnStretch(2, 1);
+	layoutGrid->setColumnStretch(3, 1);
 	EffectsDialogLayout->addLayout( layoutGrid );
 
 	layoutDialogButtonBox = new QHBoxLayout;
@@ -631,19 +650,9 @@ EffectsDialog::EffectsDialog( QWidget* parent, PageItem* item, ScribusDoc* docc
 	usedEffects->clearSelection();
 	availableEffects->clearSelection();
 	resize( minimumSizeHint() );
-	ScImage im(m_image);
-	saveValues(false);
-	im.applyEffect(effectsList, m_doc->PageColors, false);
-	QPixmap Bild = QPixmap(pixmapLabel1->width(), pixmapLabel1->height());
-	int x = (pixmapLabel1->width() - im.qImage().width()) / 2;
-	int y = (pixmapLabel1->height() - im.qImage().height()) / 2;
-	QPainter p;
-	QBrush b(QColor(205,205,205), IconManager::instance().loadPixmap("testfill"));
-	p.begin(&Bild);
-	p.fillRect(0, 0, pixmapLabel1->width(), pixmapLabel1->height(), b);
-	p.drawImage(x, y, im.qImage());
-	p.end();
-	pixmapLabel1->setPixmap( Bild );
+
+	updateImageOnLabel(pixmapLabel2, false);
+	updateImageOnLabel(pixmapLabel1);
 
 	// signals and slots connections
 	connect( CurveD1->cDisplay, SIGNAL(modified()), this, SLOT(createPreview()));
@@ -740,19 +749,7 @@ void EffectsDialog::createPreview()
 {
 	if (m_time.elapsed() < 50)
 		return;
-	ScImage im(m_image);
-	saveValues(false);
-	im.applyEffect(effectsList, m_doc->PageColors, false);
-	QPixmap Bild = QPixmap(pixmapLabel1->width(), pixmapLabel1->height());
-	int x = (pixmapLabel1->width() - im.qImage().width()) / 2;
-	int y = (pixmapLabel1->height() - im.qImage().height()) / 2;
-	QPainter p;
-	QBrush b(QColor(205,205,205), IconManager::instance().loadPixmap("testfill"));
-	p.begin(&Bild);
-	p.fillRect(0, 0, pixmapLabel1->width(), pixmapLabel1->height(), b);
-	p.drawImage(x, y, im.qImage());
-	p.end();
-	pixmapLabel1->setPixmap( Bild );
+	updateImageOnLabel(pixmapLabel1);
 	m_time.start();
 }
 
@@ -1567,3 +1564,27 @@ void EffectsDialog::selectEffectHelper(bool finalValues)
 		}
 	}
 }
+
+void EffectsDialog::updateImageOnLabel(QLabel* pixmapLabel, bool applyEffects)
+{
+	ScImage im(m_image);
+	saveValues(false);
+
+	if (applyEffects)
+	{
+		im.applyEffect(effectsList, m_doc->PageColors, false);
+	}
+
+	QPixmap Bild = QPixmap(pixmapLabel->width(), pixmapLabel->height());
+	int x = (pixmapLabel->width() - im.qImage().width()) / 2;
+	int y = (pixmapLabel->height() - im.qImage().height()) / 2;
+	QPainter p;
+	QBrush b(QColor(205,205,205), IconManager::instance().loadPixmap("testfill"));
+	p.begin(&Bild);
+	p.fillRect(0, 0, pixmapLabel->width(), pixmapLabel->height(), b);
+	p.drawImage(x, y, im.qImage());
+	p.end();
+	pixmapLabel->setPixmap( Bild );
+}
+
+
diff --git a/scribus/ui/effectsdialog.h b/scribus/ui/effectsdialog.h
index d1c52f8ffe..7d620c1606 100644
--- a/scribus/ui/effectsdialog.h
+++ b/scribus/ui/effectsdialog.h
@@ -50,6 +50,7 @@ class SCRIBUS_API EffectsDialog : public QDialog
 	void setItemSelectable(QListWidget* widget, int itemNr, bool enable);
 
 	QLabel* pixmapLabel1 { nullptr };
+	QLabel* pixmapLabel2 { nullptr };
 	QLabel* textLabel1 { nullptr };
 	QLabel* textLabel2 { nullptr };
 	QLabel* textLabel3 { nullptr };
@@ -64,6 +65,7 @@ class SCRIBUS_API EffectsDialog : public QDialog
 	QLabel* textLabel12 { nullptr };
 	QLabel* textLabel14 { nullptr };
 	QLabel* textLabel15 { nullptr };
+	QLabel* textLabel16 { nullptr };
 	QStackedWidget* optionStack { nullptr };
 	QWidget* WStackPage { nullptr };
 	QWidget* WStackPage_2 { nullptr };
@@ -216,6 +218,8 @@ public slots:
 	QVBoxLayout* layout8 { nullptr };
 	QHBoxLayout* layout7 { nullptr };
 	QHBoxLayout* layoutDialogButtonBox { nullptr };
+
+	void updateImageOnLabel(QLabel* pixmapLabel, bool applyEffects = true);
 };
 
 #endif // EFFECTSDIALOG_H
PatchYes

Activities

qirat

2026-02-11 09:38

reporter   ~0053465

I second that. :)

Issue History

Date Modified Username Field Change
2026-02-11 09:24 YtterX New Issue
2026-02-11 09:24 YtterX File Added: adding-before-image-effectsdialog.png
2026-02-11 09:24 YtterX File Added: master...ytterx_scribus_effectsdialog-adding-before-image.patch
2026-02-11 09:38 qirat Note Added: 0053465