r20390 by fschmid -

scribus-commit scribus-commit at lists.scribus.net
Thu Sep 17 19:04:51 UTC 2015


Author: fschmid
Date: Thu Sep 17 19:04:51 2015
New Revision: 20390

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20390
Log:
Revert committ r20326 as nobody seem to like it. :-(

Modified:
    trunk/Scribus/scribus/canvas.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
    trunk/Scribus/scribus/scpage.cpp
    trunk/Scribus/scribus/scpage.h
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/ui/margindialog.cpp
    trunk/Scribus/scribus/ui/margindialog.h
    trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp
    trunk/Scribus/scribus/ui/pagepalette_pages.cpp
    trunk/Scribus/scribus/ui/pagepalette_pages.h

Modified: trunk/Scribus/scribus/canvas.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20390&path=/trunk/Scribus/scribus/canvas.cpp
==============================================================================
--- trunk/Scribus/scribus/canvas.cpp	(original)
+++ trunk/Scribus/scribus/canvas.cpp	Thu Sep 17 19:04:51 2015
@@ -990,10 +990,7 @@
 	ScPainter *painter=0;
 	QImage img = QImage(clipw, cliph, QImage::Format_ARGB32_Premultiplied);
 	painter = new ScPainter(&img, img.width(), img.height(), 1.0, 0);
-	if (m_doc->masterPageMode())
-		painter->clear(m_doc->currentPage()->getMarkColor());
-	else
-		painter->clear(palette().color(QPalette::Window));
+	painter->clear(palette().color(QPalette::Window));
 	painter->newPath();
 	painter->moveTo(0, 0);
 	painter->lineTo(clipw, 0);

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20390&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp	Thu Sep 17 19:04:51 2015
@@ -3584,8 +3584,6 @@
 	ef.M  = attrs.valueAsInt("M", 0);
 	ef.Di = attrs.valueAsInt("Di", 0);
 	newPage->PresentVals = ef;
-	if (attrs.hasAttribute("markC"))
-		newPage->setMarkColor(QColor(attrs.valueAsString("markC")));
 	return true;
 }
 

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20390&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	Thu Sep 17 19:04:51 2015
@@ -1519,7 +1519,6 @@
 		docu.writeAttribute("Dm", page->PresentVals.Dm);
 		docu.writeAttribute("M", page->PresentVals.M);
 		docu.writeAttribute("Di", page->PresentVals.Di);
-		docu.writeAttribute("markC", page->getMarkColor().name());
 		docu.writeEndElement();
 	}
 }

Modified: trunk/Scribus/scribus/scpage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20390&path=/trunk/Scribus/scribus/scpage.cpp
==============================================================================
--- trunk/Scribus/scribus/scpage.cpp	(original)
+++ trunk/Scribus/scribus/scpage.cpp	Thu Sep 17 19:04:51 2015
@@ -62,7 +62,6 @@
 	PresentVals.Dm = 0;
 	PresentVals.M = 0;
 	PresentVals.Di = 0;
-	m_markColor = Qt::blue;
 }
 
 ScPage::~ScPage()
@@ -99,11 +98,6 @@
 	m_PageName = newName;
 	if (!newName.isEmpty())
 		setUName(QObject::tr("Master Page ") + newName);
-}
-
-void ScPage::setMarkColor(QColor color)
-{
-	m_markColor = color;
 }
 
 void ScPage::restore(UndoState* state, bool isUndo)

Modified: trunk/Scribus/scribus/scpage.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20390&path=/trunk/Scribus/scribus/scpage.h
==============================================================================
--- trunk/Scribus/scribus/scpage.h	(original)
+++ trunk/Scribus/scribus/scpage.h	Thu Sep 17 19:04:51 2015
@@ -68,8 +68,6 @@
 	double topMargin() const { return Margins.top(); }
 	double bottomMargin() const { return Margins.bottom(); }
 	double rightMargin() const { return Margins.right(); }
-	void setMarkColor(QColor color);
-	QColor getMarkColor() const { return m_markColor; }
 
 	MarginStruct Margins;
 	MarginStruct initialMargins;
@@ -121,7 +119,6 @@
 	QString m_PageName;
 	ScribusDoc* m_Doc;	
 	QString m_pageSectionNumber;
-	QColor m_markColor;
 };
 
 Q_DECLARE_METATYPE(ScPage*);

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20390&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Thu Sep 17 19:04:51 2015
@@ -6215,8 +6215,6 @@
 		double pageHeight = dia->getPageHeight();
 		double pageWidth = dia->getPageWidth();
 		QString pageSizeName = dia->getpPrefsPageSizeName();
-		if (doc->masterPageMode())
-			doc->currentPage()->setMarkColor(dia->markerColor());
 		int lp=0;
 		if (doc->masterPageMode() && doc->pagePositioning() != singlePage)
 			lp = dia->pageOrder();

Modified: trunk/Scribus/scribus/ui/margindialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20390&path=/trunk/Scribus/scribus/ui/margindialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/margindialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/margindialog.cpp	Thu Sep 17 19:04:51 2015
@@ -141,22 +141,10 @@
 			++cc;
 		}
 		masterLayout->addWidget( masterPageComboBox );
-		pageFillColor = QColor();
-	}
-	else
-	{
-		masterPageComboBox = NULL;
-		masterPageLabel->setText( tr( "Page Marker Color:" ) );
-		QPixmap pm(100, 30);
-		pm.fill(doc->currentPage()->getMarkColor());
-		pageFillColor = doc->currentPage()->getMarkColor();
-		pageFillColorButton = new QPushButton(this);
-		pageFillColorButton->setText( QString::null );
-		pageFillColorButton->setIcon(pm);
-		masterLayout->addWidget( pageFillColorButton );
-		connect(pageFillColorButton, SIGNAL(clicked()), this, SLOT(changeMarkerColor()));
 	}
 	dialogLayout->addWidget( groupMaster );
+	if (doc->masterPageMode())
+		groupMaster->hide();
 
 	okCancelLayout = new QHBoxLayout;
 	okCancelLayout->setSpacing( 5 );
@@ -298,18 +286,6 @@
 	connect(heightSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setPageHeight(double)));
 }
 
-void MarginDialog::changeMarkerColor()
-{
-	QColor newColor(QColorDialog::getColor(pageFillColor, this));
-	if (newColor.isValid())
-	{
-		QPixmap pm(100, 30);
-		pm.fill(newColor);
-		pageFillColor = newColor;
-		pageFillColorButton->setIcon(pm);
-	}
-}
-
 int MarginDialog::pageOrder()
 {
 	int lp=0;
@@ -376,11 +352,6 @@
 	return "";
 }
 
-QColor MarginDialog::markerColor()
-{
-	return pageFillColor;
-}
-
 int MarginDialog::getMarginPreset()
 {
 	return GroupRand->getMarginPreset();

Modified: trunk/Scribus/scribus/ui/margindialog.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20390&path=/trunk/Scribus/scribus/ui/margindialog.h
==============================================================================
--- trunk/Scribus/scribus/ui/margindialog.h	(original)
+++ trunk/Scribus/scribus/ui/margindialog.h	Thu Sep 17 19:04:51 2015
@@ -69,7 +69,6 @@
 	/*! \brief Master Page
 	\retval QString Master Page Name */
 	QString masterPage();
-	QColor markerColor();
 	int getMarginPreset();
 
 public slots:
@@ -89,7 +88,6 @@
 	It's called from width spinbox.
 	\param v new height */
 	virtual void setPageHeight(double v);
-	void changeMarkerColor();
 
 private:
 	MarginWidget* GroupRand;
@@ -121,7 +119,6 @@
 	QVBoxLayout* dialogLayout;
 	QHBoxLayout* okCancelLayout;
 	QHBoxLayout* masterLayout;
-	QColor pageFillColor;
 
 
 };

Modified: trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20390&path=/trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp	(original)
+++ trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp	Thu Sep 17 19:04:51 2015
@@ -499,9 +499,6 @@
 			mpItem->setFlags(mpItem->flags() &= ~Qt::ItemIsEditable);
 		}
 		mpItem->setData(Qt::UserRole, it.key());
-		QPixmap pm(16, 16);
-		pm.fill(m_doc->MasterPages.at(it.value())->getMarkColor());
-		mpItem->setIcon(pm);
 		masterPageListBox->addItem(mpItem);
 	}
 	deleteButton->setEnabled(m_doc->MasterNames.count() == 1 ? false : true);

Modified: trunk/Scribus/scribus/ui/pagepalette_pages.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20390&path=/trunk/Scribus/scribus/ui/pagepalette_pages.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pagepalette_pages.cpp	(original)
+++ trunk/Scribus/scribus/ui/pagepalette_pages.cpp	Thu Sep 17 19:04:51 2015
@@ -130,7 +130,7 @@
 	currView->DrawNew();
 	SeItem* pageItem = pageView->GetPageItem(pageIndex);
 	if (pageItem)
-		pageItem->setIcon(createIcon(pageIndex, masterpageName, pix, currView->Doc->MasterPages.at(currView->Doc->MasterNames[masterpageName])->getMarkColor()));
+		pageItem->setIcon(createIcon(pageIndex, masterpageName, pix));
 }
 
 void PagePalette_Pages::pageView_movePage(int r, int c)
@@ -205,9 +205,6 @@
 		else
 			item = new QListWidgetItem(pageLabel, masterPageList);
 		item->setData(Qt::UserRole, pageName);
-		QPixmap pm(16, 16);
-		pm.fill(currView->Doc->MasterPages.at(it.value())->getMarkColor());
-		item->setIcon(pm);
 	}
 }
 
@@ -275,7 +272,7 @@
 	for (int a = 0; a < currView->Doc->DocPages.count(); ++a)
 	{
 		str = currView->Doc->DocPages.at(a)->MPageNam;
-		SeItem *it = new SeItem(str, a, createIcon(a, str, pix, currView->Doc->MasterPages.at(currView->Doc->MasterNames[str])->getMarkColor()));
+		SeItem *it = new SeItem(str, a, createIcon(a, str, pix));
 		pageList.append(it);
 		pageView->setItem(rowcounter*rowmult+rowadd, counter*colmult+coladd, (QTableWidgetItem *)it);
 		pageView->setColumnWidth(counter*colmult+coladd, pix.width());
@@ -355,7 +352,7 @@
 	}
 }
 
-QPixmap PagePalette_Pages::createIcon(int nr, QString masterPage, QPixmap pixin, QColor color)
+QPixmap PagePalette_Pages::createIcon(int nr, QString masterPage, QPixmap pixin)
 {
 	QPainter p;
 	// Necessary on windows to ensure the pixmap is drawable
@@ -378,7 +375,7 @@
 		if (Exp.indexIn(masterPage) != -1)
 			masterPage = Exp.cap(1);
 		QRect d = QRect(0, 0, ret.width(), ret.height());
-		p.fillRect(d.adjusted(-1, -1, -1, -1), color);
+	//	p.fillRect(d.adjusted(-1, -1, -1, -1), color);
 		p.setFont(QFont("Helvetica", 7, QFont::Normal));
 		p.drawText(d, Qt::AlignCenter, tmp+"\n"+masterPage);
 		p.end();

Modified: trunk/Scribus/scribus/ui/pagepalette_pages.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20390&path=/trunk/Scribus/scribus/ui/pagepalette_pages.h
==============================================================================
--- trunk/Scribus/scribus/ui/pagepalette_pages.h	(original)
+++ trunk/Scribus/scribus/ui/pagepalette_pages.h	Thu Sep 17 19:04:51 2015
@@ -67,7 +67,7 @@
 	QList<SeItem*>    pageList;
 	QPixmap pix;
 
-	QPixmap createIcon(int nr, QString mp, QPixmap pixin, QColor color);
+	QPixmap createIcon(int nr, QString mp, QPixmap pixin);
 };
 
 #endif // SEITENPAL_H




More information about the scribus-commit mailing list