View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0017747 | Scribus | User Interface | public | 2026-02-11 09:24 | 2026-02-13 01:44 |
| Reporter | YtterX | Assigned To | |||
| Priority | low | Severity | feature | Reproducibility | always |
| Status | new | Resolution | open | ||
| Product Version | 1.7.3.svn | ||||
| Summary | 0017747: Adding image to show image before effects are applied | ||||
| Description | When 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 Information | I 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). | ||||
| Tags | No 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
| ||||
| Patch | Yes | ||||
|
|
I second that. :) |
|
|
First, creating an .ui file where it's missing, it's mostly a good idea : - ) Having a way to compare the image is for sure also a good idea. But I'm not sure if your proposal is the best one. I tend not to use much (or at all...) the image effects, but I started it "for you" and here a few comments: - If we want two image previews, shouldn't they be rather vertically stacked? That would IMO be a better choice, if we keep the current height of the dialog. But you could also make the dialog shorter and wider... - Or would be enough / better to have a single image and a checkbox to enable disable the effect: you would see the difference in place. It would even be useful to have a checkbox for each effect (and one for switching all of them) - Finally, the way Gimp works seems to be the most useful one: if I take the Brightness and Contrast dialog, in Gimp I can enable / disable the preview on canvas. At the same tame I can zoom and pan the canvas. That would IMO the best solution also for Scribus: the user could preview single effects at high zoom to see their effects in the details. As said, I'm not a (heavy) user of the effect, so others people opinion might be more relevant. But those are my thoughts : - ) |
|
|
Thanks for the feedback, I only really use scribus once a year to make a 0000048:0000028-32 page magazine within 1 weekend for an event, printing it at the end in mostly black/white, adjusting images to grayscale and adjusting contrast helps with print quality (was going to experiment with adding a gamma correction algorithm) I'm not a UX designer and do not use many other image manipulation tools so I value other opinions on this, so thanks! I like the Gimp implementation a lot and it has a lot of benefits and I think would make workflow better as well. I'll work on creating the .ui file, while maybe some more discussions is happening on what to exactly implement. Another idea is to not have a dialog, but replace the button by the actual functionality? Or maybe partial functionality there? Some more opinions by daily users would be better for this I think.. |
|
|
Hey, @ale. I agree it is not a highly used feature but it still is a useful one. IMO as well, the Gimp way is fine; checkboxes would be great. That can be done using a single image and the space below can be used for a master one (if individual effect checkboxes would be next to the effects themselves). Anyway, |
| 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 | |
| 2026-02-12 20:00 | ale | Note Added: 0053477 | |
| 2026-02-12 20:30 | YtterX | Note Added: 0053478 | |
| 2026-02-13 01:44 | qirat | Note Added: 0053479 |