r17401 by jghali - #7793: Make crop mark length user-settable

scribus-commit scribus-commit at lists.scribus.net
Tue Mar 27 20:35:40 UTC 2012


Author: jghali
Date: Tue Mar 27 20:35:40 2012
New Revision: 17401

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17401
Log:
#7793: Make crop mark length user-settable

Modified:
    trunk/Scribus/scribus/pdflib_core.cpp
    trunk/Scribus/scribus/pdfoptions.h
    trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
    trunk/Scribus/scribus/prefsmanager.cpp
    trunk/Scribus/scribus/pslib.cpp
    trunk/Scribus/scribus/pslib.h
    trunk/Scribus/scribus/scpageoutput.cpp
    trunk/Scribus/scribus/scpageoutput.h
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/scribusstructs.h
    trunk/Scribus/scribus/ui/pdfopts.cpp
    trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
    trunk/Scribus/scribus/ui/prefs_pdfexportbase.ui
    trunk/Scribus/scribus/ui/prefs_printer.cpp
    trunk/Scribus/scribus/ui/prefs_printerbase.ui
    trunk/Scribus/scribus/ui/preview.cpp
    trunk/Scribus/scribus/ui/printdialog.cpp
    trunk/Scribus/scribus/ui/printdialogbase.ui
    trunk/Scribus/scribus/ui/tabpdfoptions.cpp
    trunk/Scribus/scribus/ui/tabpdfoptions.h

Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17401&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp (original)
+++ trunk/Scribus/scribus/pdflib_core.cpp Tue Mar 27 20:35:40 2012
@@ -2733,7 +2733,10 @@
 	uint PgNr =  ActPageP->pageNr();
 	double markOffs = 0.0;
 	if ((Options.cropMarks) || (Options.bleedMarks) || (Options.registrationMarks) || (Options.colorMarks) || (Options.docInfoMarks))
-		markOffs = 20.0 + Options.markOffset;
+		markOffs = Options.markLength + Options.markOffset;
+	if ((Options.registrationMarks) || (Options.colorMarks) || (Options.docInfoMarks))
+		markOffs = qMax(markOffs, Options.markOffset + 20.0);
+	double markDelta = markOffs - (Options.markLength + Options.markOffset);
 	double bleedRight, bleedLeft;
 	getBleeds(ActPageP, bleedLeft, bleedRight);
 	double maxBoxX = ActPageP->width()+bleedLeft+bleedRight+markOffs*2.0;
@@ -2747,32 +2750,32 @@
 		if (Options.cropMarks)
 		{
 		// Bottom Left
-			PutPage("0 "+FToStr(markOffs+Options.bleeds.Bottom)+" m\n");
-			PutPage(FToStr(20.0)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" l\n");
+			PutPage(FToStr(markDelta)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" m\n");
+			PutPage(FToStr(markDelta+Options.markLength)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" l\n");
 			PutPage("S\n");
-			PutPage(FToStr(markOffs+bleedLeft)+" 0 m\n");
-			PutPage(FToStr(markOffs+bleedLeft)+" 20 l\n");
+			PutPage(FToStr(markOffs+bleedLeft)+" "+FToStr(markDelta)+" m\n");
+			PutPage(FToStr(markOffs+bleedLeft)+" "+FToStr(markDelta+Options.markLength)+" l\n");
 			PutPage("S\n");
 		// Top Left
-			PutPage("0 "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
-			PutPage(FToStr(20.0)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" l\n");
+			PutPage(FToStr(markDelta)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
+			PutPage(FToStr(markDelta+Options.markLength)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" l\n");
 			PutPage("S\n");
-			PutPage(FToStr(markOffs+bleedLeft)+" "+FToStr(maxBoxY)+" m\n");
-			PutPage(FToStr(markOffs+bleedLeft)+" "+FToStr(maxBoxY-20.0)+" l\n");
+			PutPage(FToStr(markOffs+bleedLeft)+" "+FToStr(maxBoxY-markDelta)+" m\n");
+			PutPage(FToStr(markOffs+bleedLeft)+" "+FToStr(maxBoxY-markDelta-Options.markLength) +" l\n");
 			PutPage("S\n");
 		// Bottom Right
-			PutPage(FToStr(maxBoxX)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" m\n");
-			PutPage(FToStr(maxBoxX-20.0)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" l\n");
+			PutPage(FToStr(maxBoxX-markDelta)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" m\n");
+			PutPage(FToStr(maxBoxX-markDelta-Options.markLength)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" l\n");
 			PutPage("S\n");
-			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(0.0)+" m\n");
-			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(20.0)+" l\n");
+			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+ FToStr(markDelta)+" m\n");
+			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+ FToStr(markDelta+Options.markLength) +" l\n");
 			PutPage("S\n");
 		// Top Right
-			PutPage(FToStr(maxBoxX)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
-			PutPage(FToStr(maxBoxX-20.0)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" l\n");
+			PutPage(FToStr(maxBoxX-markDelta)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
+			PutPage(FToStr(maxBoxX-markDelta-Options.markLength)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" l\n");
 			PutPage("S\n");
-			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(maxBoxY)+" m\n");
-			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(maxBoxY-20.0)+" l\n");
+ 			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+ FToStr(maxBoxY-markDelta)+" m\n");
+			PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+ FToStr(maxBoxY-markDelta-Options.markLength) +" l\n");
 			PutPage("S\n");
 		}
 		if (Options.bleedMarks)
@@ -2780,61 +2783,62 @@
 			PutPage("q\n");
 			PutPage("[3 1 1 1] 0 d\n");
 		// Bottom Left
-			PutPage("0 "+FToStr(markOffs)+" m\n");
-			PutPage(FToStr(20.0)+" "+FToStr(markOffs)+" l\n");
+			PutPage(FToStr(markDelta)+" "+FToStr(markOffs)+" m\n");
+			PutPage(FToStr(markDelta+Options.markLength)+" "+FToStr(markOffs)+" l\n");
 			PutPage("S\n");
-			PutPage(FToStr(markOffs)+" 0 m\n");
-			PutPage(FToStr(markOffs)+" 20 l\n");
+			PutPage(FToStr(markOffs)+" "+FToStr(markDelta)+" m\n");
+			PutPage(FToStr(markOffs)+" "+FToStr(markDelta+Options.markLength)+" l\n");
 			PutPage("S\n");
 		// Top Left
-			PutPage("0 "+FToStr(maxBoxY-markOffs)+" m\n");
-			PutPage(FToStr(20.0)+" "+FToStr(maxBoxY-markOffs)+" l\n");
+			PutPage(FToStr(markDelta)+" "+FToStr(maxBoxY-markOffs)+" m\n");
+			PutPage(FToStr(markDelta+Options.markLength)+" "+FToStr(maxBoxY-markOffs)+" l\n");
 			PutPage("S\n");
-			PutPage(FToStr(markOffs)+" "+FToStr(maxBoxY)+" m\n");
-			PutPage(FToStr(markOffs)+" "+FToStr(maxBoxY-20.0)+" l\n");
+			PutPage(FToStr(markOffs)+" "+FToStr(maxBoxY-markDelta)+" m\n");
+			PutPage(FToStr(markOffs)+" "+FToStr(maxBoxY-markDelta-Options.markLength)+" l\n");
 			PutPage("S\n");
 		// Bottom Right
-			PutPage(FToStr(maxBoxX)+" "+FToStr(markOffs)+" m\n");
-			PutPage(FToStr(maxBoxX-20.0)+" "+FToStr(markOffs)+" l\n");
+			PutPage(FToStr(maxBoxX-markDelta)+" "+FToStr(markOffs)+" m\n");
+			PutPage(FToStr(maxBoxX-markDelta-Options.markLength)+" "+FToStr(markOffs)+" l\n");
 			PutPage("S\n");
-			PutPage(FToStr(maxBoxX-markOffs)+" "+FToStr(0.0)+" m\n");
-			PutPage(FToStr(maxBoxX-markOffs)+" "+FToStr(20.0)+" l\n");
+			PutPage(FToStr(maxBoxX-markOffs)+" "+FToStr(markDelta)+" m\n");
+			PutPage(FToStr(maxBoxX-markOffs)+" "+FToStr(markDelta+Options.markLength)+" l\n");
 			PutPage("S\n");
 		// Top Right
-			PutPage(FToStr(maxBoxX)+" "+FToStr(maxBoxY-markOffs)+" m\n");
-			PutPage(FToStr(maxBoxX-20.0)+" "+FToStr(maxBoxY-markOffs)+" l\n");
+			PutPage(FToStr(maxBoxX-markDelta)+" "+FToStr(maxBoxY-markOffs)+" m\n");
+			PutPage(FToStr(maxBoxX-markDelta-Options.markLength)+" "+FToStr(maxBoxY-markOffs)+" l\n");
 			PutPage("S\n");
-			PutPage(FToStr(maxBoxX-markOffs)+" "+FToStr(maxBoxY)+" m\n");
-			PutPage(FToStr(maxBoxX-markOffs)+" "+FToStr(maxBoxY-20.0)+" l\n");
+			PutPage(FToStr(maxBoxX-markOffs)+" "+FToStr(maxBoxY-markDelta)+" m\n");
+			PutPage(FToStr(maxBoxX-markOffs)+" "+FToStr(maxBoxY-markDelta-Options.markLength)+" l\n");
 			PutPage("S\n");
 			PutPage("Q\n");
 		}
 		if (Options.registrationMarks)
 		{
+			double regDelta  = markOffs - Options.markOffset;
 			QString regCross = "0 7 m\n14 7 l\nh\n7 0 m\n7 14 l\nh\n13 7 m\n13 10.31383 10.31383 13 7 13 c\n3.68629 13 1 10.31383 1 7 c\n1 3.68629 3.68629 1 7 1 c\n";
 			regCross += "10.31383 1 13 3.68629 13 7 c\nh\n10.5 7 m\n10.5 8.93307 8.93307 10.5 7 10.5 c\n5.067 10.5 3.5 8.93307 3.5 7 c\n";
 			regCross += "3.5 5.067 5.067 3.5 7 3.5 c\n8.93307 3.5 10.5 5.067 10.5 7 c\nh\nS\n";
 			PutPage("q\n");
-			PutPage("1 0 0 1 "+FToStr(maxBoxX / 2.0 - 7.0)+" 3 cm\n");
+			PutPage("1 0 0 1 "+FToStr(maxBoxX / 2.0 - 7.0)+" "+FToStr(regDelta - 17)+" cm\n");
 			PutPage(regCross);
 			PutPage("Q\n");
 			PutPage("q\n");
-			PutPage("1 0 0 1 3 "+FToStr(maxBoxY / 2.0 - 7.0)+" cm\n");
+			PutPage("1 0 0 1 "+FToStr(regDelta - 17)+" "+FToStr(maxBoxY / 2.0 - 7.0)+" cm\n");
 			PutPage(regCross);
 			PutPage("Q\n");
 			PutPage("q\n");
-			PutPage("1 0 0 1 "+FToStr(maxBoxX / 2.0 - 7.0)+" "+FToStr(maxBoxY - 17.0)+" cm\n");
+			PutPage("1 0 0 1 "+FToStr(maxBoxX / 2.0 - 7.0)+" "+FToStr(maxBoxY - regDelta + 3.0)+" cm\n");
 			PutPage(regCross);
 			PutPage("Q\n");
 			PutPage("q\n");
-			PutPage("1 0 0 1 "+FToStr(maxBoxX - 17.0)+" "+FToStr(maxBoxY / 2.0 - 7.0)+" cm\n");
+			PutPage("1 0 0 1 "+FToStr(maxBoxX - regDelta + 3.0)+" "+FToStr(maxBoxY / 2.0 - 7.0)+" cm\n");
 			PutPage(regCross);
 			PutPage("Q\n");
 		}
 		if (Options.colorMarks)
 		{
 			double startX = markOffs+bleedLeft+6.0;
-			double startY = maxBoxY - 18.0;
+			double startY = maxBoxY - markOffs + Options.markOffset + 2.0;
 			PutPage("0 0 0 1 K\n");
 			double col = 1.0;
 			for (int bl = 0; bl < 11; bl++)
@@ -2887,7 +2891,8 @@
 			FPointArray  textPath;
 			QPainterPath painter1, painter2;
 			QFont   infoFont("Helvetica", 7);
-			double  startX = markOffs+bleedLeft+10.0;
+			double  startX = markOffs + bleedLeft + 10.0;
+			double  startY = markOffs - Options.markOffset - 14;
 			QString docTitle = doc.documentInfo().title();
 			if (docTitle.isEmpty())
 			{
@@ -2898,10 +2903,7 @@
 			docTitle += "  "+ tr("Page:")+" "+ QString::number(PgNr+1);
 			PutPage("/"+spotMapReg["Register"].ResName+" cs 1 scn\n");
 			PutPage("q\n");
-			PutPage("1 0 0 1 "+FToStr(startX)+" 6 cm\n");
-//			PutPage("BT\n");
-//			PutPage("/"+StdFonts["/Helvetica"]+" 7 Tf\n");
-//			PutPage(EncString(docTitle, ObjCounter) + " Tj\nET\n");
+			PutPage("1 0 0 1 "+FToStr(startX)+" "+FToStr(startY)+" cm\n");
 			painter1.addText( QPointF(0.0,0.0), infoFont, docTitle );
 			textPath.fromQPainterPath(painter1);
 			PutPage(SetClipPathArray(&textPath, true));
@@ -2910,11 +2912,7 @@
 			QDate d = QDate::currentDate();
 			QString docDate = tr("Date:")+" "+d.toString(Qt::TextDate);
 			PutPage("q\n");
-			PutPage("1 0 0 1 "+FToStr(maxBoxX / 2.0 + 20.0)+" 6 cm\n");
-//			PutPage("BT\n");
-//			PutPage("/"+StdFonts["/Helvetica"]+" 7 Tf\n");
-//			QDate d = QDate::currentDate();
-//			PutPage(EncString( tr("Date:")+" "+d.toString(Qt::TextDate), ObjCounter) + " Tj\nET\n");
+			PutPage("1 0 0 1 "+FToStr(maxBoxX / 2.0 + 20.0)+" "+FToStr(startY)+" cm\n");
 			painter2.addText( QPointF(0.0,0.0), infoFont, docDate );
 			textPath.fromQPainterPath(painter2);
 			PutPage(SetClipPathArray(&textPath, true));
@@ -3158,7 +3156,9 @@
 	bleedDisplacementY = 0.0;
 	PutPage("q\n"); // Save
 	if ((Options.cropMarks) || (Options.bleedMarks) || (Options.registrationMarks) || (Options.colorMarks) || (Options.docInfoMarks))
-		markOffs = 20.0 + Options.markOffset;
+		markOffs = Options.markLength + Options.markOffset;
+	if ((Options.registrationMarks) || (Options.colorMarks) || (Options.docInfoMarks))
+		markOffs = qMax(markOffs, Options.markOffset + 20.0);
 	// #8773 - incorrect page position if MPageNam.isEmpty()
 	/*if (!pag->MPageNam.isEmpty())
 	{*/

Modified: trunk/Scribus/scribus/pdfoptions.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17401&path=/trunk/Scribus/scribus/pdfoptions.h
==============================================================================
--- trunk/Scribus/scribus/pdfoptions.h (original)
+++ trunk/Scribus/scribus/pdfoptions.h Tue Mar 27 20:35:40 2012
@@ -154,6 +154,7 @@
 	bool colorMarks;
 	bool docInfoMarks;
 	bool useDocBleeds;
+	double markLength;
 	double markOffset;
 	QString openAction;
 };

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17401&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp Tue Mar 27 20:35:40 2012
@@ -1513,6 +1513,7 @@
 	doc->pdfOptions().registrationMarks = attrs.valueAsBool("registrationMarks", false);
 	doc->pdfOptions().colorMarks    = attrs.valueAsBool("colorMarks", false);
 	doc->pdfOptions().docInfoMarks  = attrs.valueAsBool("docInfoMarks", false);
+	doc->pdfOptions().markLength    = attrs.valueAsDouble("markLength", 0.0);
 	doc->pdfOptions().markOffset    = attrs.valueAsDouble("markOffset", 0.0);
 	doc->pdfOptions().EmbeddedI     = attrs.valueAsBool("ImagePr", false);
 	doc->pdfOptions().PassOwner     = attrs.valueAsString("PassOwner", "");
@@ -1603,6 +1604,7 @@
 		doc->Print_Options.prnEngine = (PrintEngine) attrs.valueAsInt("PrintEngine", 3);
 	else
 		doc->Print_Options.prnEngine = (PrintEngine) attrs.valueAsInt("PSLevel", 3);
+	doc->Print_Options.markLength    = attrs.valueAsDouble("markLength");
 	doc->Print_Options.markOffset    = attrs.valueAsDouble("markOffset");
 	doc->Print_Options.bleeds.Top    = attrs.valueAsDouble("BleedTop");
 	doc->Print_Options.bleeds.Left   = attrs.valueAsDouble("BleedLeft");

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17401&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp Tue Mar 27 20:35:40 2012
@@ -627,6 +627,7 @@
 	docu.writeAttribute("setDevParam", static_cast<int>(m_Doc->Print_Options.setDevParam));
 	docu.writeAttribute("useDocBleeds", static_cast<int>(m_Doc->Print_Options.useDocBleeds));
 	docu.writeAttribute("cropMarks", static_cast<int>(m_Doc->Print_Options.cropMarks));
+	docu.writeAttribute("cropMarkSize" , m_Doc->Print_Options.cropMarkSize);
 	docu.writeAttribute("bleedMarks", static_cast<int>(m_Doc->Print_Options.bleedMarks));
 	docu.writeAttribute("registrationMarks", static_cast<int>(m_Doc->Print_Options.registrationMarks));
 	docu.writeAttribute("colorMarks", static_cast<int>(m_Doc->Print_Options.colorMarks));
@@ -686,6 +687,7 @@
 	docu.writeAttribute("BBottom", m_Doc->pdfOptions().bleeds.Bottom);
 	docu.writeAttribute("useDocBleeds", static_cast<int>(m_Doc->pdfOptions().useDocBleeds));
 	docu.writeAttribute("cropMarks", static_cast<int>(m_Doc->pdfOptions().cropMarks));
+	docu.writeAttribute("cropMarkSize", m_Doc->pdfOptions().cropMarkSize);
 	docu.writeAttribute("bleedMarks", static_cast<int>(m_Doc->pdfOptions().bleedMarks));
 	docu.writeAttribute("registrationMarks", static_cast<int>(m_Doc->pdfOptions().registrationMarks));
 	docu.writeAttribute("colorMarks", static_cast<int>(m_Doc->pdfOptions().colorMarks));

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17401&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 Tue Mar 27 20:35:40 2012
@@ -2857,6 +2857,7 @@
 	doc->pdfOptions().registrationMarks = attrs.valueAsBool("registrationMarks", false);
 	doc->pdfOptions().colorMarks    = attrs.valueAsBool("colorMarks", false);
 	doc->pdfOptions().docInfoMarks  = attrs.valueAsBool("docInfoMarks", false);
+	doc->pdfOptions().markLength    = attrs.valueAsDouble("markLength", 20.0);
 	doc->pdfOptions().markOffset    = attrs.valueAsDouble("markOffset", 0.0);
 	doc->pdfOptions().EmbeddedI     = attrs.valueAsBool("ImagePr", false);
 	doc->pdfOptions().PassOwner     = attrs.valueAsString("PassOwner", "");
@@ -2948,6 +2949,7 @@
 		doc->Print_Options.prnEngine = (PrintEngine) attrs.valueAsInt("PrintEngine", 3);
 	else
 		doc->Print_Options.prnEngine = (PrintEngine) attrs.valueAsInt("PSLevel", 3);
+	doc->Print_Options.markLength    = attrs.valueAsDouble("markLength");
 	doc->Print_Options.markOffset    = attrs.valueAsDouble("markOffset");
 	doc->Print_Options.bleeds.Top    = attrs.valueAsDouble("BleedTop");
 	doc->Print_Options.bleeds.Left   = attrs.valueAsDouble("BleedLeft");

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17401&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 Tue Mar 27 20:35:40 2012
@@ -1006,6 +1006,7 @@
 	docu.writeAttribute("includePDFMarks", static_cast<int>(m_Doc->Print_Options.includePDFMarks));
 	docu.writeAttribute("PSLevel", (m_Doc->Print_Options.prnEngine < WindowsGDI) ? m_Doc->Print_Options.prnEngine : PostScript3);
 	docu.writeAttribute("PDLanguage" , m_Doc->Print_Options.prnEngine);
+	docu.writeAttribute("markLength" , m_Doc->Print_Options.markLength);
 	docu.writeAttribute("markOffset" , m_Doc->Print_Options.markOffset);
 	docu.writeAttribute("BleedTop"   , m_Doc->Print_Options.bleeds.Top);
 	docu.writeAttribute("BleedLeft"  , m_Doc->Print_Options.bleeds.Left);
@@ -1063,6 +1064,7 @@
 	docu.writeAttribute("registrationMarks", static_cast<int>(m_Doc->pdfOptions().registrationMarks));
 	docu.writeAttribute("colorMarks", static_cast<int>(m_Doc->pdfOptions().colorMarks));
 	docu.writeAttribute("docInfoMarks", static_cast<int>(m_Doc->pdfOptions().docInfoMarks));
+	docu.writeAttribute("markLength", m_Doc->pdfOptions().markLength);
 	docu.writeAttribute("markOffset", m_Doc->pdfOptions().markOffset);
 	docu.writeAttribute("ImagePr", static_cast<int>(m_Doc->pdfOptions().EmbeddedI));
 	docu.writeAttribute("PassOwner", m_Doc->pdfOptions().PassOwner);

Modified: trunk/Scribus/scribus/prefsmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17401&path=/trunk/Scribus/scribus/prefsmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/prefsmanager.cpp (original)
+++ trunk/Scribus/scribus/prefsmanager.cpp Tue Mar 27 20:35:40 2012
@@ -459,6 +459,7 @@
 	appPrefs.pdfPrefs.registrationMarks = false;
 	appPrefs.pdfPrefs.colorMarks = false;
 	appPrefs.pdfPrefs.docInfoMarks = false;
+	appPrefs.pdfPrefs.markLength = 20;
 	appPrefs.pdfPrefs.markOffset = 0;
 	appPrefs.pdfPrefs.EmbeddedI = false;
 	appPrefs.pdfPrefs.Encrypt = false;
@@ -1745,6 +1746,7 @@
 	pdf.setAttribute("RegistrationMarks", static_cast<int>(appPrefs.pdfPrefs.registrationMarks));
 	pdf.setAttribute("ColorMarks", static_cast<int>(appPrefs.pdfPrefs.colorMarks));
 	pdf.setAttribute("DocInfoMarks", static_cast<int>(appPrefs.pdfPrefs.docInfoMarks));
+	pdf.setAttribute("MarkLength", appPrefs.pdfPrefs.markLength);
 	pdf.setAttribute("MarkOffset", appPrefs.pdfPrefs.markOffset);
 	pdf.setAttribute("ImagePr", static_cast<int>(appPrefs.pdfPrefs.EmbeddedI));
 	pdf.setAttribute("PassOwner", appPrefs.pdfPrefs.PassOwner);
@@ -2484,6 +2486,7 @@
 			appPrefs.pdfPrefs.registrationMarks = static_cast<bool>(dc.attribute("RegistrationMarks", "0").toInt());
 			appPrefs.pdfPrefs.colorMarks = static_cast<bool>(dc.attribute("ColorMarks", "0").toInt());
 			appPrefs.pdfPrefs.docInfoMarks = static_cast<bool>(dc.attribute("DocInfoMarks", "0").toInt());
+			appPrefs.pdfPrefs.markLength = ScCLocale::toDoubleC(dc.attribute("MarkLength"), 20.0);
 			appPrefs.pdfPrefs.markOffset = ScCLocale::toDoubleC(dc.attribute("MarkOffset"), 0.0);
 			appPrefs.pdfPrefs.EmbeddedI  = static_cast<bool>(dc.attribute("ImagePr", "0").toInt());
 			appPrefs.pdfPrefs.PassOwner  = dc.attribute("PassOwner", "");

Modified: trunk/Scribus/scribus/pslib.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17401&path=/trunk/Scribus/scribus/pslib.cpp
==============================================================================
--- trunk/Scribus/scribus/pslib.cpp (original)
+++ trunk/Scribus/scribus/pslib.cpp Tue Mar 27 20:35:40 2012
@@ -420,7 +420,7 @@
 	return ret;
 }
 
-bool PSLib::PS_begin_doc(ScribusDoc *doc, double x, double y, double breite, double hoehe, int numpage, bool doDev, bool sep, bool farb, bool ic, bool gcr)
+bool PSLib::PS_begin_doc(ScribusDoc *doc, double x, double y, double width, double height, int numpage, bool doDev, bool sep, bool farb, bool ic, bool gcr)
 {
 	m_Doc = doc;
 	PutStream(Header);
@@ -428,16 +428,16 @@
 	PutStream("%%Title: " + Titel + "\n");
 	PutStream("%%Creator: " + Creator + "\n");
 	PutStream("%%Pages: " + IToStr(numpage) + "\n");
-	if(breite < hoehe || !psExport)
-	{
-		BBox = "%%BoundingBox: " + IToStr(qRound(x)) + " " + IToStr(qRound(y)) + " " + IToStr(qRound(breite)) + " " + IToStr(qRound(hoehe)) + "\n";
-		BBoxH = "%%HiResBoundingBox: " + ToStr(x) + " " + ToStr(y) + " " + ToStr(breite) + " " + ToStr(hoehe) + "\n";
+	if(width < height || !psExport)
+	{
+		BBox = "%%BoundingBox: " + IToStr(qRound(x)) + " " + IToStr(qRound(y)) + " " + IToStr(qRound(width)) + " " + IToStr(qRound(height)) + "\n";
+		BBoxH = "%%HiResBoundingBox: " + ToStr(x) + " " + ToStr(y) + " " + ToStr(width) + " " + ToStr(height) + "\n";
 	}
 	else
 	{
 		
-		BBox = "%%BoundingBox: " + IToStr(qRound(x)) + " " + IToStr(qRound(y)) + " " + IToStr(qRound(hoehe)) + " " + IToStr(qRound(breite)) + "\n";
-		BBoxH = "%%HiResBoundingBox: " + ToStr(x) + " " + ToStr(y) + " " + ToStr(hoehe) + " " + ToStr(breite) + "\n";
+		BBox = "%%BoundingBox: " + IToStr(qRound(x)) + " " + IToStr(qRound(y)) + " " + IToStr(qRound(height)) + " " + IToStr(qRound(width)) + "\n";
+		BBoxH = "%%HiResBoundingBox: " + ToStr(x) + " " + ToStr(y) + " " + ToStr(height) + " " + ToStr(width) + "\n";
 	}
  // 	if (!Art)
 //	{
@@ -593,7 +593,9 @@
 	double bleedLeft = 0.0;
 	double markOffs = 0.0;
 	if ((Options.cropMarks) || (Options.bleedMarks) || (Options.registrationMarks) || (Options.colorMarks))
-		markOffs = 20.0 + Options.markOffset;
+		markOffs = Options.markLength + Options.markOffset;
+	if ((Options.registrationMarks) || (Options.colorMarks))
+		markOffs = qMax(markOffs, Options.markOffset + 20.0);
 	GetBleeds(pg, bleedLeft, bleedRight);
 	double maxBoxX = pg->width()+bleedLeft+bleedRight+markOffs*2.0;
 	double maxBoxY = pg->height()+Options.bleeds.Bottom+Options.bleeds.Top+markOffs*2.0;
@@ -650,7 +652,10 @@
 	PutStream("%%PageTrailer\nrestore\n");
 	double markOffs = 0.0;
 	if ((Options.cropMarks) || (Options.bleedMarks) || (Options.registrationMarks) || (Options.colorMarks))
-		markOffs = 20.0 + Options.markOffset;
+		markOffs = Options.markLength + Options.markOffset;
+	if ((Options.registrationMarks) || (Options.colorMarks))
+		markOffs = qMax(markOffs, Options.markOffset + 20.0);
+	double markDelta = markOffs - (Options.markLength + Options.markOffset);
 	double bleedRight, bleedLeft;
 	GetBleeds(ActPage, bleedLeft, bleedRight);
 	double maxBoxX = ActPage->width()+bleedLeft+bleedRight+markOffs*2.0;
@@ -669,32 +674,32 @@
 		if (Options.cropMarks)
 		{
 		// Bottom Left
-			PutStream("0 "+ToStr(markOffs+Options.bleeds.Bottom)+" m\n");
-			PutStream(ToStr(20.0)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" li\n");
+			PutStream(ToStr(markDelta)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" m\n");
+			PutStream(ToStr(markDelta+Options.markLength)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" li\n");
 			PutStream("st\n");
-			PutStream(ToStr(markOffs+bleedLeft)+" 0 m\n");
-			PutStream(ToStr(markOffs+bleedLeft)+" 20 li\n");
+			PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(markDelta)+" m\n");
+			PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(markDelta+Options.markLength)+" li\n");
 			PutStream("st\n");
 		// Top Left
-			PutStream("0 "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
-			PutStream(ToStr(20.0)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" li\n");
+			PutStream(ToStr(markDelta)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
+			PutStream(ToStr(markDelta+Options.markLength)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" li\n");
 			PutStream("st\n");
-			PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(maxBoxY)+" m\n");
-			PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(maxBoxY-20.0)+" li\n");
+			PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(maxBoxY-markDelta)+" m\n");
+			PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(maxBoxY-markDelta-Options.markLength) +" li\n");
 			PutStream("st\n");
 		// Bottom Right
-			PutStream(ToStr(maxBoxX)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" m\n");
-			PutStream(ToStr(maxBoxX-20.0)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" li\n");
+			PutStream(ToStr(maxBoxX-markDelta)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" m\n");
+			PutStream(ToStr(maxBoxX-markDelta-Options.markLength)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" li\n");
 			PutStream("st\n");
-			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(0.0)+" m\n");
-			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(20.0)+" li\n");
+			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ ToStr(markDelta)+" m\n");
+			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ ToStr(markDelta+Options.markLength) +" li\n");
 			PutStream("st\n");
 		// Top Right
-			PutStream(ToStr(maxBoxX)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
-			PutStream(ToStr(maxBoxX-20.0)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" li\n");
+			PutStream(ToStr(maxBoxX-markDelta)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
+			PutStream(ToStr(maxBoxX-markDelta-Options.markLength)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" li\n");
 			PutStream("st\n");
-			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(maxBoxY)+" m\n");
-			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ToStr(maxBoxY-20.0)+" li\n");
+ 			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ ToStr(maxBoxY-markDelta)+" m\n");
+			PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ ToStr(maxBoxY-markDelta-Options.markLength) +" li\n");
 			PutStream("st\n");
 		}
 		if (Options.bleedMarks)
@@ -702,61 +707,62 @@
 			PutStream("gs\n");
 			PutStream("[3 1 1 1] 0 setdash\n");
 		// Bottom Left
-			PutStream("0 "+ToStr(markOffs)+" m\n");
-			PutStream(ToStr(20.0)+" "+ToStr(markOffs)+" li\n");
+			PutStream(ToStr(markDelta)+" "+ToStr(markOffs)+" m\n");
+			PutStream(ToStr(markDelta+Options.markLength)+" "+ToStr(markOffs)+" li\n");
 			PutStream("st\n");
-			PutStream(ToStr(markOffs)+" 0 m\n");
-			PutStream(ToStr(markOffs)+" 20 l\n");
+			PutStream(ToStr(markOffs)+" "+ToStr(markDelta)+" m\n");
+			PutStream(ToStr(markOffs)+" "+ToStr(markDelta+Options.markLength)+" li\n");
 			PutStream("st\n");
 		// Top Left
-			PutStream("0 "+ToStr(maxBoxY-markOffs)+" m\n");
-			PutStream(ToStr(20.0)+" "+ToStr(maxBoxY-markOffs)+" li\n");
+			PutStream(ToStr(markDelta)+" "+ToStr(maxBoxY-markOffs)+" m\n");
+			PutStream(ToStr(markDelta+Options.markLength)+" "+ToStr(maxBoxY-markOffs)+" li\n");
 			PutStream("st\n");
-			PutStream(ToStr(markOffs)+" "+ToStr(maxBoxY)+" m\n");
-			PutStream(ToStr(markOffs)+" "+ToStr(maxBoxY-20.0)+" li\n");
+			PutStream(ToStr(markOffs)+" "+ToStr(maxBoxY-markDelta)+" m\n");
+			PutStream(ToStr(markOffs)+" "+ToStr(maxBoxY-markDelta-Options.markLength)+" li\n");
 			PutStream("st\n");
 		// Bottom Right
-			PutStream(ToStr(maxBoxX)+" "+ToStr(markOffs)+" m\n");
-			PutStream(ToStr(maxBoxX-20.0)+" "+ToStr(markOffs)+" li\n");
+			PutStream(ToStr(maxBoxX-markDelta)+" "+ToStr(markOffs)+" m\n");
+			PutStream(ToStr(maxBoxX-markDelta-Options.markLength)+" "+ToStr(markOffs)+" li\n");
 			PutStream("st\n");
-			PutStream(ToStr(maxBoxX-markOffs)+" "+ToStr(0.0)+" m\n");
-			PutStream(ToStr(maxBoxX-markOffs)+" "+ToStr(20.0)+" li\n");
+			PutStream(ToStr(maxBoxX-markOffs)+" "+ToStr(markDelta)+" m\n");
+			PutStream(ToStr(maxBoxX-markOffs)+" "+ToStr(markDelta+Options.markLength)+" li\n");
 			PutStream("st\n");
 		// Top Right
-			PutStream(ToStr(maxBoxX)+" "+ToStr(maxBoxY-markOffs)+" m\n");
-			PutStream(ToStr(maxBoxX-20.0)+" "+ToStr(maxBoxY-markOffs)+" li\n");
+			PutStream(ToStr(maxBoxX-markDelta)+" "+ToStr(maxBoxY-markOffs)+" m\n");
+			PutStream(ToStr(maxBoxX-markDelta-Options.markLength)+" "+ToStr(maxBoxY-markOffs)+" li\n");
 			PutStream("st\n");
-			PutStream(ToStr(maxBoxX-markOffs)+" "+ToStr(maxBoxY)+" m\n");
-			PutStream(ToStr(maxBoxX-markOffs)+" "+ToStr(maxBoxY-20.0)+" li\n");
+			PutStream(ToStr(maxBoxX-markOffs)+" "+ToStr(maxBoxY-markDelta)+" m\n");
+			PutStream(ToStr(maxBoxX-markOffs)+" "+ToStr(maxBoxY-markDelta-Options.markLength)+" li\n");
 			PutStream("st\n");
 			PutStream("gr\n");
 		}
 		if (Options.registrationMarks)
 		{
+			double regDelta  = markOffs - Options.markOffset;
 			QString regCross = "0 7 m\n14 7 li\n7 0 m\n7 14 li\n13 7 m\n13 10.31383 10.31383 13 7 13 cu\n3.68629 13 1 10.31383 1 7 cu\n1 3.68629 3.68629 1 7 1 cu\n";
 			regCross += "10.31383 1 13 3.68629 13 7 cu\ncl\n10.5 7 m\n10.5 8.93307 8.93307 10.5 7 10.5 cu\n5.067 10.5 3.5 8.93307 3.5 7 cu\n";
 			regCross += "3.5 5.067 5.067 3.5 7 3.5 cu\n8.93307 3.5 10.5 5.067 10.5 7 cu\ncl\nst\n";
 			PutStream("gs\n");
-			PutStream(ToStr(maxBoxX / 2.0 - 7.0)+" 3 tr\n");
+			PutStream(ToStr(maxBoxX / 2.0 - 7.0)+" "+ToStr(regDelta - 17)+" tr\n");
 			PutStream(regCross);
 			PutStream("gr\n");
 			PutStream("gs\n");
-			PutStream("3 "+ToStr(maxBoxY / 2.0 - 7.0)+" tr\n");
+			PutStream(ToStr(regDelta - 17)+" "+ToStr(maxBoxY / 2.0 - 7.0)+" tr\n");
 			PutStream(regCross);
 			PutStream("gr\n");
 			PutStream("gs\n");
-			PutStream(ToStr(maxBoxX / 2.0 - 7.0)+" "+ToStr(maxBoxY - 17.0)+" tr\n");
+			PutStream(ToStr(maxBoxX / 2.0 - 7.0)+" "+ToStr(maxBoxY - regDelta + 3.0)+" tr\n");
 			PutStream(regCross);
 			PutStream("gr\n");
 			PutStream("gs\n");
-			PutStream(ToStr(maxBoxX - 17.0)+" "+ToStr(maxBoxY / 2.0 - 7.0)+" tr\n");
+			PutStream(ToStr(maxBoxX - regDelta + 3.0)+" "+ToStr(maxBoxY / 2.0 - 7.0)+" tr\n");
 			PutStream(regCross);
 			PutStream("gr\n");
 		}
 		if (Options.colorMarks)
 		{
 			double startX = markOffs+bleedLeft+6.0;
-			double startY = maxBoxY - 18.0;
+			double startY = maxBoxY - markOffs + Options.markOffset + 2.0;
 			PutStream("0 0 0 1 cmyk\n");
 			double col = 1.0;
 			for (int bl = 0; bl < 11; bl++)

Modified: trunk/Scribus/scribus/pslib.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17401&path=/trunk/Scribus/scribus/pslib.h
==============================================================================
--- trunk/Scribus/scribus/pslib.h (original)
+++ trunk/Scribus/scribus/pslib.h Tue Mar 27 20:35:40 2012
@@ -81,7 +81,7 @@
 
 		virtual bool PS_set_file(QString fn);
 		virtual void PS_set_Info(QString art, QString was);
-		virtual bool PS_begin_doc(ScribusDoc *doc, double x, double y, double breite, double hoehe, int numpage, bool doDev, bool sep, bool farb, bool ic, bool gcr);
+		virtual bool PS_begin_doc(ScribusDoc *doc, double x, double y, double width, double height, int numpage, bool doDev, bool sep, bool farb, bool ic, bool gcr);
 		virtual void PS_begin_page(ScPage* pg, MarginStruct* Ma, bool Clipping);
 		virtual void PS_end_page();
 		virtual void PS_curve(double x1, double y1, double x2, double y2, double x3, double y3);

Modified: trunk/Scribus/scribus/scpageoutput.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17401&path=/trunk/Scribus/scribus/scpageoutput.cpp
==============================================================================
--- trunk/Scribus/scribus/scpageoutput.cpp (original)
+++ trunk/Scribus/scribus/scpageoutput.cpp Tue Mar 27 20:35:40 2012
@@ -38,6 +38,7 @@
 
 MarksOptions::MarksOptions(void)
 {
+	markLength = 20.0;
 	markOffset = 0.0;
 	BleedTop = 0.0;
 	BleedLeft = 0.0;
@@ -52,6 +53,7 @@
 
 MarksOptions::MarksOptions(struct PrintOptions& opt)
 {
+	markLength = opt.markLength;
 	markOffset = opt.markOffset;
 	BleedTop = opt.bleeds.Top;
 	BleedLeft = opt.bleeds.Left;
@@ -1907,7 +1909,8 @@
 
 void ScPageOutput::drawMarks( ScPage* page, ScPainterExBase* painter, const MarksOptions& options )
 {
-	double markOffs  = options.markOffset;
+	double markLength = options.markLength;
+	double markOffs   = options.markOffset;
 	double bleedLeft = 0.0, bleedRight = 0.0;
 	double bleedBottom = options.BleedBottom;
 	double bleedTop = options.BleedTop;
@@ -1943,14 +1946,14 @@
 		FPoint start, end;
 		double left = offsetX, right = offsetX + width;
 		double bottom = offsetY + height, top = offsetY;
-		drawBoxMarks( painter, QRectF(QPointF(left, top), QPointF(right, bottom)), bleedBox, markOffs );
+		drawBoxMarks( painter, QRectF(QPointF(left, top), QPointF(right, bottom)), bleedBox, markOffs, markLength);
 	}
 	if (options.bleedMarks)
 	{
 		FPoint start, end;
 		double left = offsetX - bleedLeft, right = offsetX + width + bleedRight;
 		double bottom = offsetY + height + bleedBottom, top = offsetY - bleedTop;;
-		drawBoxMarks( painter, QRectF(QPointF(left, top), QPointF(right, bottom)), bleedBox, markOffs );
+		drawBoxMarks( painter, QRectF(QPointF(left, top), QPointF(right, bottom)), bleedBox, markOffs, markLength);
 	}
 	if (options.registrationMarks)
 	{
@@ -2032,7 +2035,7 @@
 	painter->restore();
 }
 
-void ScPageOutput::drawBoxMarks( ScPainterExBase* painter, const QRectF& box, const QRectF& bleedBox, double offset )
+void ScPageOutput::drawBoxMarks( ScPainterExBase* painter, const QRectF& box, const QRectF& bleedBox, double offset , double markSize)
 {
 	FPoint start, end;
 	double left   = box.left(), right = box.right();
@@ -2041,31 +2044,31 @@
 	double bleedBottom = bleedBox.bottom(), bleedTop = bleedBox.top();
 	// Top Left
 	start.setXY( bleedLeft - offset, top );
-	end.setXY  ( bleedLeft - offset - 20, top );
+	end.setXY  ( bleedLeft - offset - markSize, top );
 	painter->drawLine(start, end);
 	start.setXY( left, bleedTop - offset );
-	end.setXY  ( left, bleedTop - offset - 20);
+	end.setXY  ( left, bleedTop - offset - markSize);
 	painter->drawLine(start, end);
 	// Top Right
 	start.setXY( bleedRight + offset, top );
-	end.setXY  ( bleedRight + offset + 20, top );
+	end.setXY  ( bleedRight + offset + markSize, top );
 	painter->drawLine(start, end);
 	start.setXY( right, bleedTop - offset );
-	end.setXY  ( right, bleedTop - offset - 20);
+	end.setXY  ( right, bleedTop - offset - markSize);
 	painter->drawLine(start, end);
 	// Bottom Left
 	start.setXY( bleedLeft - offset, bottom );
-	end.setXY  ( bleedLeft - offset - 20, bottom  );
+	end.setXY  ( bleedLeft - offset - markSize, bottom  );
 	painter->drawLine(start, end);
 	start.setXY( left, bleedBottom + offset );
-	end.setXY  ( left, bleedBottom + offset + 20);
+	end.setXY  ( left, bleedBottom + offset + markSize);
 	painter->drawLine(start, end);
 	// Bottom Right
 	start.setXY( bleedRight + offset, bottom );
-	end.setXY  ( bleedRight + offset + 20, bottom  );
+	end.setXY  ( bleedRight + offset + markSize, bottom  );
 	painter->drawLine(start, end);
 	start.setXY( right, bleedBottom + offset );
-	end.setXY  ( right, bleedBottom + offset + 20);
+	end.setXY  ( right, bleedBottom + offset + markSize);
 	painter->drawLine(start, end);
 }
 

Modified: trunk/Scribus/scribus/scpageoutput.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17401&path=/trunk/Scribus/scribus/scpageoutput.h
==============================================================================
--- trunk/Scribus/scribus/scpageoutput.h (original)
+++ trunk/Scribus/scribus/scpageoutput.h Tue Mar 27 20:35:40 2012
@@ -37,6 +37,7 @@
 public:
 	MarksOptions(void);
 	MarksOptions(struct PrintOptions& opt);
+	double markLength;
 	double markOffset;
 	double BleedTop;
 	double BleedLeft;
@@ -88,7 +89,7 @@
 
 	virtual void drawArrow(ScPainterExBase* painter, PageItem* item, QTransform &arrowTrans, int arrowIndex);
 	virtual void drawMarks( ScPage* page, ScPainterExBase* painter, const MarksOptions& options );
-	virtual void drawBoxMarks( ScPainterExBase* painter, const QRectF& box, const QRectF& bleedBox, double offset );
+	virtual void drawBoxMarks( ScPainterExBase* painter, const QRectF& box, const QRectF& bleedBox, double offset , double markSize);
 	virtual void drawRegistrationCross( ScPainterExBase* painter );
 
 	ScImage::RequestType translateImageModeToRequest( ScPainterExBase::ImageMode mode);

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17401&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Tue Mar 27 20:35:40 2012
@@ -7899,6 +7899,7 @@
 	options.bleedMarks = false;
 	options.registrationMarks = false;
 	options.colorMarks = false;
+	options.markLength = 20.0;
 	options.markOffset = 0.0;
 	options.bleeds.Top = 0.0;
 	options.bleeds.Left = 0.0;

Modified: trunk/Scribus/scribus/scribusstructs.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17401&path=/trunk/Scribus/scribus/scribusstructs.h
==============================================================================
--- trunk/Scribus/scribus/scribusstructs.h (original)
+++ trunk/Scribus/scribus/scribusstructs.h Tue Mar 27 20:35:40 2012
@@ -231,6 +231,7 @@
 	bool includePDFMarks;
 	int  copies;
 	PrintEngine prnEngine;
+	double markLength;
 	double markOffset;
 	MarginStruct bleeds;
 	std::vector<int> pageNumbers;
@@ -386,5 +387,3 @@
 
 #endif
 
-
-

Modified: trunk/Scribus/scribus/ui/pdfopts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17401&path=/trunk/Scribus/scribus/ui/pdfopts.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pdfopts.cpp (original)
+++ trunk/Scribus/scribus/ui/pdfopts.cpp Tue Mar 27 20:35:40 2012
@@ -271,7 +271,8 @@
 		Opts.bleeds.Right = Options->BleedRight->value()/docUnitRatio;
 		Opts.bleeds.Bottom = Options->BleedBottom->value()/docUnitRatio;
 	}
-	Opts.markOffset = Options->markOffset->value()/docUnitRatio;
+	Opts.markLength = Options->markLength->value() / docUnitRatio;
+	Opts.markOffset = Options->markOffset->value() / docUnitRatio;
 	Opts.cropMarks = Options->cropMarks->isChecked();
 	Opts.bleedMarks = Options->bleedMarks->isChecked();
 	Opts.registrationMarks = Options->registrationMarks->isChecked();

Modified: trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17401&path=/trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_pdfexport.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_pdfexport.cpp Tue Mar 27 20:35:40 2012
@@ -89,7 +89,8 @@
 	printRegistrationMarksCheckBox->setToolTip( "<qt>" + tr( "Add registration marks to each separation" ) + "</qt>" );
 	printColorBarsCheckBox->setToolTip( "<qt>" + tr( "Add color calibration bars" ) + "</qt>" );
 	printPageInfoCheckBox->setToolTip( "<qt>" + tr( "Add document information which includes the document title and page numbers" ) + "</qt>" );
-	registrationMarkOffsetSpinBox->setToolTip( "<qt>" + tr( "Indicate the distance offset for the registration marks" ) + "</qt>" );
+	markLengthSpinBox->setToolTip( "<qt>" + tr( "Length of crop marks" ) + "</qt>" );
+	markOffsetSpinBox->setToolTip( "<qt>" + tr( "Indicate the distance offset for the registration marks" ) + "</qt>" );
 //	BleedTop->setToolTip( "<qt>" + tr( "Distance for bleed from the top of the physical page" ) + "</qt>" );
 //	BleedBottom->setToolTip( "<qt>" + tr( "Distance for bleed from the bottom of the physical page" ) + "</qt>" );
 //	BleedLeft->setToolTip( "<qt>" + tr( "Distance for bleed from the left of the physical page" ) + "</qt>" );
@@ -108,9 +109,14 @@
 void Prefs_PDFExport::unitChange(int unitIndex)
 {
 	unitRatio = unitGetRatioFromIndex(unitIndex);
-	registrationMarkOffsetSpinBox->setNewUnit(unitIndex);
-	registrationMarkOffsetSpinBox->setMinimum(0);
-	registrationMarkOffsetSpinBox->setMaximum(3000 * unitRatio);
+
+	markLengthSpinBox->setNewUnit(unitIndex);
+	markLengthSpinBox->setMinimum(0);
+	markLengthSpinBox->setMaximum(3000 * unitRatio);
+
+	markOffsetSpinBox->setNewUnit(unitIndex);
+	markOffsetSpinBox->setMinimum(0);
+	markOffsetSpinBox->setMaximum(3000 * unitRatio);
 }
 
 void Prefs_PDFExport::languageChange()
@@ -547,7 +553,8 @@
 	else
 		useDocumentBleedsCheckBox->hide();
 
-	registrationMarkOffsetSpinBox->setValue(prefsData->pdfPrefs.markOffset*unitRatio);
+	markLengthSpinBox->setValue(prefsData->pdfPrefs.markLength*unitRatio);
+	markOffsetSpinBox->setValue(prefsData->pdfPrefs.markOffset*unitRatio);
 	printCropMarksCheckBox->setChecked(prefsData->pdfPrefs.cropMarks);
 	printBleedMarksCheckBox->setChecked(prefsData->pdfPrefs.bleedMarks);
 	printRegistrationMarksCheckBox->setChecked(prefsData->pdfPrefs.registrationMarks);
@@ -678,9 +685,10 @@
 	prefsData->pdfPrefs.registrationMarks = printRegistrationMarksCheckBox->isChecked();
 	prefsData->pdfPrefs.colorMarks = printColorBarsCheckBox->isChecked();
 	prefsData->pdfPrefs.docInfoMarks = printPageInfoCheckBox->isChecked();
-	prefsData->pdfPrefs.markOffset = registrationMarkOffsetSpinBox->value() / unitRatio;
+	prefsData->pdfPrefs.markLength   = markLengthSpinBox->value() / unitRatio;
+	prefsData->pdfPrefs.markOffset   = markOffsetSpinBox->value() / unitRatio;
 	prefsData->pdfPrefs.useDocBleeds = useDocumentBleedsCheckBox->isChecked();
-	prefsData->pdfPrefs.bleeds=bleedsWidget->margins();
+	prefsData->pdfPrefs.bleeds = bleedsWidget->margins();
 	prefsData->pdfPrefs.doClip = clipToPrinterMarginsCheckBox->isChecked();
 	if (useEncryptionCheckBox->isChecked())
 	{

Modified: trunk/Scribus/scribus/ui/prefs_pdfexportbase.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17401&path=/trunk/Scribus/scribus/ui/prefs_pdfexportbase.ui
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_pdfexportbase.ui (original)
+++ trunk/Scribus/scribus/ui/prefs_pdfexportbase.ui Tue Mar 27 20:35:40 2012
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>648</width>
-    <height>525</height>
+    <height>550</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -261,8 +261,8 @@
            <rect>
             <x>0</x>
             <y>0</y>
-            <width>563</width>
-            <height>456</height>
+            <width>577</width>
+            <height>455</height>
            </rect>
           </property>
           <layout class="QVBoxLayout" name="verticalLayout_19">
@@ -685,8 +685,8 @@
            <rect>
             <x>0</x>
             <y>0</y>
-            <width>563</width>
-            <height>638</height>
+            <width>577</width>
+            <height>606</height>
            </rect>
           </property>
           <layout class="QVBoxLayout" name="verticalLayout_8">
@@ -1012,8 +1012,8 @@
            <rect>
             <x>0</x>
             <y>0</y>
-            <width>563</width>
-            <height>470</height>
+            <width>577</width>
+            <height>436</height>
            </rect>
           </property>
           <layout class="QVBoxLayout" name="verticalLayout_18">
@@ -1038,51 +1038,89 @@
             </widget>
            </item>
            <item>
-            <layout class="QFormLayout" name="formLayout_7">
-             <item row="3" column="0" colspan="2">
+            <layout class="QGridLayout" name="gridLayout">
+             <item row="0" column="1">
+              <layout class="QHBoxLayout" name="horizontalLayout_11">
+               <item>
+                <widget class="QLabel" name="label_43">
+                 <property name="text">
+                  <string>Mark Length:</string>
+                 </property>
+                </widget>
+               </item>
+               <item>
+                <widget class="ScrSpinBox" name="markLengthSpinBox">
+                 <property name="minimum">
+                  <number>1</number>
+                 </property>
+                 <property name="maximum">
+                  <number>100</number>
+                 </property>
+                 <property name="value">
+                  <number>20</number>
+                 </property>
+                </widget>
+               </item>
+              </layout>
+             </item>
+             <item row="1" column="0">
+              <widget class="QCheckBox" name="printBleedMarksCheckBox">
+               <property name="text">
+                <string>Bleed Marks</string>
+               </property>
+              </widget>
+             </item>
+             <item row="2" column="0">
+              <widget class="QCheckBox" name="printColorBarsCheckBox">
+               <property name="text">
+                <string>Color Bars</string>
+               </property>
+              </widget>
+             </item>
+             <item row="3" column="0">
+              <widget class="QCheckBox" name="printRegistrationMarksCheckBox">
+               <property name="text">
+                <string>Registration Marks</string>
+               </property>
+              </widget>
+             </item>
+             <item row="4" column="0">
               <widget class="QCheckBox" name="printPageInfoCheckBox">
                <property name="text">
                 <string>Page Information</string>
                </property>
               </widget>
              </item>
-             <item row="4" column="0" colspan="2">
-              <widget class="QCheckBox" name="printRegistrationMarksCheckBox">
-               <property name="text">
-                <string>Registration Marks</string>
-               </property>
-              </widget>
-             </item>
-             <item row="5" column="1">
-              <widget class="ScrSpinBox" name="registrationMarkOffsetSpinBox"/>
-             </item>
-             <item row="5" column="0">
-              <widget class="QLabel" name="label_17">
-               <property name="text">
-                <string>Registration Mark Offset:</string>
-               </property>
-              </widget>
-             </item>
-             <item row="0" column="0" colspan="2">
-              <widget class="QCheckBox" name="printCropMarksCheckBox">
-               <property name="text">
-                <string>Crop Marks</string>
-               </property>
-              </widget>
-             </item>
-             <item row="1" column="0" colspan="2">
-              <widget class="QCheckBox" name="printBleedMarksCheckBox">
-               <property name="text">
-                <string>Bleed Marks</string>
-               </property>
-              </widget>
-             </item>
-             <item row="2" column="0" colspan="2">
-              <widget class="QCheckBox" name="printColorBarsCheckBox">
-               <property name="text">
-                <string>Color Bars</string>
-               </property>
-              </widget>
+             <item row="0" column="0">
+              <layout class="QHBoxLayout" name="horizontalLayout_13">
+               <property name="rightMargin">
+                <number>0</number>
+               </property>
+               <property name="bottomMargin">
+                <number>0</number>
+               </property>
+               <item>
+                <widget class="QCheckBox" name="printCropMarksCheckBox">
+                 <property name="text">
+                  <string>Crop Marks</string>
+                 </property>
+                </widget>
+               </item>
+              </layout>
+             </item>
+             <item row="1" column="1">
+              <layout class="QHBoxLayout" name="horizontalLayout_12">
+               <item>
+                <widget class="QLabel" name="label_17">
+                 <property name="text">
+                  <string>Mark Offset:</string>
+                 </property>
+                </widget>
+               </item>
+               <item>
+                <widget class="ScrSpinBox" name="markOffsetSpinBox"/>
+               </item>
+              </layout>
              </item>
             </layout>
            </item>
@@ -1783,7 +1821,24 @@
   </customwidget>
  </customwidgets>
  <resources/>
- <connections/>
+ <connections>
+  <connection>
+   <sender>printCropMarksCheckBox</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>markLengthSpinBox</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>61</x>
+     <y>113</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>134</x>
+     <y>113</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
  <buttongroups>
   <buttongroup name="rangeButtonGroup"/>
  </buttongroups>

Modified: trunk/Scribus/scribus/ui/prefs_printer.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17401&path=/trunk/Scribus/scribus/ui/prefs_printer.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_printer.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_printer.cpp Tue Mar 27 20:35:40 2012
@@ -90,8 +90,9 @@
 			   prefs->getDouble("BleedRight",0.0)*unitRatio,
 			   prefs->getDouble("BleedLeft",0.0)*unitRatio);
 	bleedsWidget->setup(bleeds, 0, 0, false, false);
-	markOffsetSpinBox->setValue(prefs->getDouble("markOffset",0.0)*unitRatio);
-	bleedMarksCheckBox->setChecked(prefs->getBool("cropMarks", false));
+	markLengthSpinBox->setValue(prefs->getDouble("markLength", 20.0)*unitRatio);
+	markOffsetSpinBox->setValue(prefs->getDouble("markOffset", 0.0)*unitRatio);
+	cropMarksCheckBox->setChecked(prefs->getBool("cropMarks", false));
 	bleedMarksCheckBox->setChecked(prefs->getBool("bleedMarks", false));
 	registrationMarksCheckBox->setChecked(prefs->getBool("registrationMarks", false));
 	colorBarsCheckBox->setChecked(prefs->getBool("colorMarks", false));
@@ -122,10 +123,11 @@
 	prefs->set("ICCinUse", applyICCProfilesCheckBox->isChecked());
 	double unitRatio = unitGetRatioFromIndex(prefsData->docSetupPrefs.docUnitIndex);
 	MarginStruct bleeds(bleedsWidget->margins());
-		prefs->set("BleedTop", bleeds.Left / unitRatio);
+	prefs->set("BleedTop", bleeds.Left / unitRatio);
 	prefs->set("BleedBottom", bleeds.Bottom / unitRatio);
 	prefs->set("BleedRight", bleeds.Right / unitRatio);
 	prefs->set("BleedLeft", bleeds.Left / unitRatio);
+	prefs->set("markLength", markLengthSpinBox->value() / unitRatio);
 	prefs->set("markOffset", markOffsetSpinBox->value() / unitRatio);
 	prefs->set("cropMarks", cropMarksCheckBox->isChecked());
 	prefs->set("bleedMarks", bleedMarksCheckBox->isChecked());

Modified: trunk/Scribus/scribus/ui/prefs_printerbase.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17401&path=/trunk/Scribus/scribus/ui/prefs_printerbase.ui
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_printerbase.ui (original)
+++ trunk/Scribus/scribus/ui/prefs_printerbase.ui Tue Mar 27 20:35:40 2012
@@ -46,9 +46,9 @@
       <property name="geometry">
        <rect>
         <x>0</x>
-        <y>-351</y>
-        <width>716</width>
-        <height>1035</height>
+        <y>-334</y>
+        <width>714</width>
+        <height>958</height>
        </rect>
       </property>
       <layout class="QVBoxLayout" name="verticalLayout_2">
@@ -451,57 +451,72 @@
         </widget>
        </item>
        <item>
-        <widget class="QCheckBox" name="cropMarksCheckBox">
-         <property name="text">
-          <string>Crop Marks</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QCheckBox" name="bleedMarksCheckBox">
-         <property name="text">
-          <string>Bleed Marks</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QCheckBox" name="registrationMarksCheckBox">
-         <property name="text">
-          <string>Registration Marks</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QCheckBox" name="colorBarsCheckBox">
-         <property name="text">
-          <string>Color Bars</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <layout class="QHBoxLayout" name="horizontalLayout_5">
-         <item>
-          <widget class="QLabel" name="label_10">
+        <layout class="QGridLayout" name="gridLayout">
+         <item row="0" column="0">
+          <widget class="QCheckBox" name="cropMarksCheckBox">
            <property name="text">
-            <string>Offset:</string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="ScrSpinBox" name="markOffsetSpinBox"/>
-         </item>
-         <item>
-          <spacer name="horizontalSpacer_3">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
+            <string>Crop Marks</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QCheckBox" name="bleedMarksCheckBox">
+           <property name="text">
+            <string>Bleed Marks</string>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0">
+          <widget class="QCheckBox" name="registrationMarksCheckBox">
+           <property name="text">
+            <string>Registration Marks</string>
+           </property>
+          </widget>
+         </item>
+         <item row="3" column="0">
+          <widget class="QCheckBox" name="colorBarsCheckBox">
+           <property name="text">
+            <string>Color Bars</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <layout class="QHBoxLayout" name="horizontalLayout_5">
+           <item>
+            <widget class="QLabel" name="label_10">
+             <property name="text">
+              <string>Offset:</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="ScrSpinBox" name="markOffsetSpinBox"/>
+           </item>
+          </layout>
+         </item>
+         <item row="0" column="1">
+          <layout class="QHBoxLayout" name="horizontalLayout_6">
+           <item>
+            <widget class="QLabel" name="label_12">
+             <property name="text">
+              <string>Length:</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="ScrSpinBox" name="markLengthSpinBox">
+             <property name="minimum">
+              <number>1</number>
+             </property>
+             <property name="maximum">
+              <number>100</number>
+             </property>
+             <property name="value">
+              <number>20</number>
+             </property>
+            </widget>
+           </item>
+          </layout>
          </item>
         </layout>
        </item>
@@ -594,5 +609,22 @@
   </customwidget>
  </customwidgets>
  <resources/>
- <connections/>
+ <connections>
+  <connection>
+   <sender>cropMarksCheckBox</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>markLengthSpinBox</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>55</x>
+     <y>485</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>128</x>
+     <y>485</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
 </ui>

Modified: trunk/Scribus/scribus/ui/preview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17401&path=/trunk/Scribus/scribus/ui/preview.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/preview.cpp (original)
+++ trunk/Scribus/scribus/ui/preview.cpp Tue Mar 27 20:35:40 2012
@@ -602,6 +602,7 @@
 		options.bleedMarks = false;
 		options.registrationMarks = false;
 		options.colorMarks = false;
+		options.markLength = 20.0;
 		options.markOffset = 0.0;
 		options.bleeds.Top = 0.0;
 		options.bleeds.Left = 0.0;
@@ -714,6 +715,7 @@
 		options.bleedMarks = false;
 		options.registrationMarks = false;
 		options.colorMarks = false;
+		options.markLength = 20.0;
 		options.markOffset = 0.0;
 		options.bleeds.Top = 0.0;
 		options.bleeds.Left = 0.0;

Modified: trunk/Scribus/scribus/ui/printdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17401&path=/trunk/Scribus/scribus/ui/printdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/printdialog.cpp (original)
+++ trunk/Scribus/scribus/ui/printdialog.cpp Tue Mar 27 20:35:40 2012
@@ -53,6 +53,9 @@
 	printEngines->addItem( CommonStrings::trPostScript1 );
 	printEngines->addItem( CommonStrings::trPostScript2 );
 	printEngines->addItem( CommonStrings::trPostScript3 );
+	markLength->setNewUnit(unit);
+	markLength->setMinimum(1*unitRatio);
+	markLength->setMaximum(3000*unitRatio);
 	markOffset->setNewUnit(unit);
 	markOffset->setMinimum(0);
 	markOffset->setMaximum(3000*unitRatio);
@@ -408,6 +411,7 @@
 	m_doc->Print_Options.bleeds.Left   = BleedLeft->value() / m_doc->unitRatio();
 	m_doc->Print_Options.bleeds.Right  = BleedRight->value() / m_doc->unitRatio();
 	m_doc->Print_Options.bleeds.Bottom = BleedBottom->value() / m_doc->unitRatio();
+	m_doc->Print_Options.markLength = markLength->value() / m_doc->unitRatio();
 	m_doc->Print_Options.markOffset = markOffset->value() / m_doc->unitRatio();
 	m_doc->Print_Options.cropMarks  = cropMarks->isChecked();
 	m_doc->Print_Options.bleedMarks = bleedMarks->isChecked();
@@ -464,8 +468,9 @@
 	options.useSpotColors = prefs->getBool("doSpot", true);
 	options.useICC  = m_doc->HasCMS ? prefs->getBool("ICCinUse", false) : false;
 	options.useDocBleeds  = true;
-	options.bleeds=*m_doc->bleeds();
-	options.markOffset = prefs->getDouble("markOffset",0.0);
+	options.bleeds = *m_doc->bleeds();
+	options.markLength = prefs->getDouble("markLength", 20.0);
+	options.markOffset = prefs->getDouble("markOffset", 0.0);
 	options.cropMarks  = prefs->getBool("cropMarks", false);
 	options.bleedMarks = prefs->getBool("bleedMarks", false);
 	options.registrationMarks = prefs->getBool("registrationMarks", false);
@@ -545,6 +550,7 @@
 	BleedBottom->setEnabled(!docBleeds->isChecked());
 	BleedRight->setEnabled(!docBleeds->isChecked());
 	BleedLeft->setEnabled(!docBleeds->isChecked());
+	markLength->setValue(m_doc->Print_Options.markLength*unitRatio);
 	markOffset->setValue(m_doc->Print_Options.markOffset*unitRatio);
 	cropMarks->setChecked(m_doc->Print_Options.cropMarks);
 	bleedMarks->setChecked(m_doc->Print_Options.bleedMarks);

Modified: trunk/Scribus/scribus/ui/printdialogbase.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17401&path=/trunk/Scribus/scribus/ui/printdialogbase.ui
==============================================================================
--- trunk/Scribus/scribus/ui/printdialogbase.ui (original)
+++ trunk/Scribus/scribus/ui/printdialogbase.ui Tue Mar 27 20:35:40 2012
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>570</width>
-    <height>520</height>
+    <height>529</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -267,7 +267,7 @@
    <item>
     <widget class="QTabWidget" name="printOptions">
      <property name="currentIndex">
-      <number>0</number>
+      <number>2</number>
      </property>
      <widget class="QWidget" name="tab">
       <attribute name="title">
@@ -437,7 +437,17 @@
        <string>Marks</string>
       </attribute>
       <layout class="QGridLayout">
-       <item row="0" column="0">
+       <item row="5" column="0">
+        <widget class="QCheckBox" name="bleedMarks">
+         <property name="toolTip">
+          <string>This creates bleed marks which are indicated by  _ . _ and show the bleed limit</string>
+         </property>
+         <property name="text">
+          <string>Bleed Marks</string>
+         </property>
+        </widget>
+       </item>
+       <item row="2" column="0">
         <widget class="QCheckBox" name="cropMarks">
          <property name="toolTip">
           <string>This creates crop marks in the PDF indicating where the paper should be cut or trimmed after printing</string>
@@ -447,7 +457,17 @@
          </property>
         </widget>
        </item>
-       <item row="0" column="1">
+       <item row="6" column="0">
+        <widget class="QCheckBox" name="colorMarks">
+         <property name="toolTip">
+          <string>Add color calibration bars</string>
+         </property>
+         <property name="text">
+          <string>Color Bars</string>
+         </property>
+        </widget>
+       </item>
+       <item row="7" column="0">
         <widget class="QCheckBox" name="registrationMarks">
          <property name="toolTip">
           <string>Add registration marks which are added to each separation</string>
@@ -457,27 +477,31 @@
          </property>
         </widget>
        </item>
-       <item row="1" column="0">
-        <widget class="QCheckBox" name="bleedMarks">
-         <property name="toolTip">
-          <string>This creates bleed marks which are indicated by  _ . _ and show the bleed limit</string>
-         </property>
-         <property name="text">
-          <string>Bleed Marks</string>
-         </property>
-        </widget>
-       </item>
-       <item row="1" column="1">
-        <widget class="QCheckBox" name="colorMarks">
-         <property name="toolTip">
-          <string>Add color calibration bars</string>
-         </property>
-         <property name="text">
-          <string>Color Bars</string>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="0">
+       <item row="2" column="1">
+        <layout class="QHBoxLayout" name="horizontalLayout">
+         <item>
+          <widget class="QLabel" name="MarkTxt2">
+           <property name="text">
+            <string>Length:</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="ScrSpinBox" name="markLength">
+           <property name="minimum">
+            <number>1</number>
+           </property>
+           <property name="maximum">
+            <number>100</number>
+           </property>
+           <property name="value">
+            <number>20</number>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item row="5" column="1">
         <layout class="QHBoxLayout">
          <item>
           <widget class="QLabel" name="MarkTxt1">
@@ -495,15 +519,15 @@
          </item>
         </layout>
        </item>
-       <item row="2" column="1">
-        <spacer>
+       <item row="8" column="0">
+        <spacer name="verticalSpacer">
          <property name="orientation">
-          <enum>Qt::Horizontal</enum>
+          <enum>Qt::Vertical</enum>
          </property>
          <property name="sizeHint" stdset="0">
           <size>
-           <width>40</width>
-           <height>20</height>
+           <width>20</width>
+           <height>40</height>
           </size>
          </property>
         </spacer>
@@ -707,5 +731,21 @@
     </hint>
    </hints>
   </connection>
+  <connection>
+   <sender>cropMarks</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>markLength</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>58</x>
+     <y>358</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>173</x>
+     <y>358</y>
+    </hint>
+   </hints>
+  </connection>
  </connections>
 </ui>

Modified: trunk/Scribus/scribus/ui/tabpdfoptions.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17401&path=/trunk/Scribus/scribus/ui/tabpdfoptions.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/tabpdfoptions.cpp (original)
+++ trunk/Scribus/scribus/ui/tabpdfoptions.cpp Tue Mar 27 20:35:40 2012
@@ -807,14 +807,22 @@
 	registrationMarks = new QCheckBox( tr( "Registration Marks" ), MarkGroup );
 	MarkGroupLayout->addWidget( registrationMarks, 2, 0 );
 	colorMarks = new QCheckBox( tr( "Color Bars" ), MarkGroup);
-	MarkGroupLayout->addWidget( colorMarks, 0, 1, 1, 2 );
+	MarkGroupLayout->addWidget( colorMarks, 3, 0 );
 	docInfoMarks = new QCheckBox( tr( "Page Information" ), MarkGroup );
-	MarkGroupLayout->addWidget( docInfoMarks, 1, 1, 1, 2 );
+	MarkGroupLayout->addWidget( docInfoMarks, 0, 1, 1, 2 );
 	MarkTxt1 = new QLabel( MarkGroup );
-	MarkTxt1->setText( tr( "Offset:" ) );
+	MarkTxt1->setText( tr( "Length:" ) );
 	MarkGroupLayout->addWidget( MarkTxt1, 2, 1 );
+	markLength = new ScrSpinBox( MarkGroup, unitIndex );
+	MarkGroupLayout->addWidget( markLength, 2, 2 );
+	markLength->setSuffix( unit );
+	markLength->setMinimum(1 * unitRatio);
+	markLength->setMaximum(3000 * unitRatio);
+	MarkTxt2 = new QLabel( MarkGroup );
+	MarkTxt2->setText( tr( "Offset:" ) );
+	MarkGroupLayout->addWidget( MarkTxt2, 3, 1 );
 	markOffset = new ScrSpinBox( MarkGroup, unitIndex );
-	MarkGroupLayout->addWidget( markOffset, 2, 2 );
+	MarkGroupLayout->addWidget( markOffset, 3, 2 );
 	markOffset->setSuffix( unit );
 	markOffset->setMinimum(0);
 	markOffset->setMaximum(3000 * unitRatio);
@@ -996,6 +1004,7 @@
 	registrationMarks->setToolTip( "<qt>" + tr( "Add registration marks to each separation" ) + "</qt>" );
 	colorMarks->setToolTip( "<qt>" + tr( "Add color calibration bars" ) + "</qt>" );
 	docInfoMarks->setToolTip( "<qt>" + tr( "Add document information which includes the document title and page numbers" ) + "</qt>" );
+	markLength->setToolTip( "<qt>" + tr( "Indicate the size of crops'marks" ) + "</qt>" );
 	markOffset->setToolTip( "<qt>" + tr( "Indicate the distance offset for the registration marks" ) + "</qt>" );
 	BleedTop->setToolTip( "<qt>" + tr( "Distance for bleed from the top of the physical page" ) + "</qt>" );
 	BleedBottom->setToolTip( "<qt>" + tr( "Distance for bleed from the bottom of the physical page" ) + "</qt>" );
@@ -1380,6 +1389,7 @@
 		docBleeds->setChecked(Opts.useDocBleeds);
 		doDocBleeds();
 	}
+	markLength->setValue(Opts.markLength*unitRatio);
 	markOffset->setValue(Opts.markOffset*unitRatio);
 	cropMarks->setChecked(Opts.cropMarks);
 	bleedMarks->setChecked(Opts.bleedMarks);
@@ -1463,6 +1473,7 @@
 	pdfOptions.registrationMarks = registrationMarks->isChecked();
 	pdfOptions.colorMarks = colorMarks->isChecked();
 	pdfOptions.docInfoMarks = docInfoMarks->isChecked();
+	pdfOptions.markLength = markLength->value() / unitRatio;
 	pdfOptions.markOffset = markOffset->value() / unitRatio;
 	pdfOptions.useDocBleeds = docBleeds->isChecked();
 	pdfOptions.bleeds.Bottom = BleedBottom->value() / unitRatio;

Modified: trunk/Scribus/scribus/ui/tabpdfoptions.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17401&path=/trunk/Scribus/scribus/ui/tabpdfoptions.h
==============================================================================
--- trunk/Scribus/scribus/ui/tabpdfoptions.h (original)
+++ trunk/Scribus/scribus/ui/tabpdfoptions.h Tue Mar 27 20:35:40 2012
@@ -203,6 +203,7 @@
 	QCheckBox* registrationMarks;
 	QCheckBox* colorMarks;
 	QCheckBox* docInfoMarks;
+	ScrSpinBox* markLength;
 	ScrSpinBox* markOffset;
 	QGroupBox* CBox;
 	QGridLayout* CBoxLayout;
@@ -262,6 +263,7 @@
 	QLabel* BleedTxt3;
 	QLabel* BleedTxt4;
 	QLabel* MarkTxt1;
+	QLabel* MarkTxt2;
 	QCheckBox *docBleeds;
 	QGroupBox* RangeGroup;
 	QVBoxLayout* RangeGroupLayout;




More information about the scribus-commit mailing list