r18205 by fschmid - Display image correctly when showing the dialog.

scribus-commit scribus-commit at lists.scribus.net
Sat Mar 16 08:37:46 UTC 2013


Author: fschmid
Date: Sat Mar 16 08:37:46 2013
New Revision: 18205

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18205
Log:
Display image correctly when showing the dialog.

Modified:
    trunk/Scribus/scribus/ui/effectsdialog.cpp

Modified: trunk/Scribus/scribus/ui/effectsdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18205&path=/trunk/Scribus/scribus/ui/effectsdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/effectsdialog.cpp (original)
+++ trunk/Scribus/scribus/ui/effectsdialog.cpp Sat Mar 16 08:37:46 2013
@@ -628,10 +628,22 @@
 	layout18->addLayout( layout9 );
 	EffectsDialogLayout->addLayout( layout18 );
 	optionStack->setCurrentIndex(0);
-	createPreview();
 	usedEffects->clearSelection();
 	availableEffects->clearSelection();
 	resize( minimumSizeHint() );
+	ScImage im(image);
+	saveValues(false);
+	im.applyEffect(effectsList, 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), loadIcon("testfill.png"));
+	p.begin(&Bild);
+	p.fillRect(0, 0, pixmapLabel1->width(), pixmapLabel1->height(), b);
+	p.drawImage(x, y, im.qImage());
+	p.end();
+	pixmapLabel1->setPixmap( Bild );
 
 	// signals and slots connections
 	connect( okButton, SIGNAL( clicked() ), this, SLOT( leaveOK() ) );




More information about the scribus-commit mailing list