r16992 by fschmid - Fixed Bug 9157: "add new grid option"

scribus-commit scribus-commit at lists.scribus.net
Sun Nov 20 09:25:31 UTC 2011


Author: fschmid
Date: Sun Nov 20 09:25:31 2011
New Revision: 16992

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=16992
Log:
Fixed Bug 9157: "add new grid option"

Modified:
    trunk/Scribus/scribus/canvas.cpp
    trunk/Scribus/scribus/canvas.h
    trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.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/prefsstructs.h
    trunk/Scribus/scribus/ui/prefs_guides.cpp
    trunk/Scribus/scribus/ui/prefs_guides.h
    trunk/Scribus/scribus/ui/prefs_guidesbase.ui

Modified: trunk/Scribus/scribus/canvas.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16992&path=/trunk/Scribus/scribus/canvas.cpp
==============================================================================
--- trunk/Scribus/scribus/canvas.cpp (original)
+++ trunk/Scribus/scribus/canvas.cpp Sun Nov 20 09:25:31 2011
@@ -1793,6 +1793,22 @@
 /**
   draws page border
   */
+void Canvas::DrawPageBorderSub(ScPainter *p, ScPage *page)
+{
+	p->save();
+	p->setAntialiasing(false);
+	p->translate(page->xOffset(), page->yOffset());
+	double lineWidth = 1.0 / m_viewMode.scale;
+	double pageHeight = page->height();
+	double pageWidth = page->width();
+	p->setFillMode(ScPainter::None);
+	p->setStrokeMode(ScPainter::Solid);
+	p->setPen(Qt::black, lineWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+	p->drawRect(0, 0, pageWidth, pageHeight);
+	p->setAntialiasing(true);
+	p->restore();
+}
+
 void Canvas::DrawPageBorder(ScPainter *p, QRectF clip, bool master)
 {
 	if (master)
@@ -1805,20 +1821,7 @@
 		QRectF drawRect = QRectF(x, y, w+5, h+5);
 		drawRect.translate(-m_doc->minCanvasCoordinate.x() * m_viewMode.scale, -m_doc->minCanvasCoordinate.y() * m_viewMode.scale);
 		if (drawRect.intersects(clip))
-		{
-			p->save();
-			p->setAntialiasing(false);
-			p->translate(page->xOffset(), page->yOffset());
-			double lineWidth = 1.0 / m_viewMode.scale;
-			double pageHeight = page->height();
-			double pageWidth = page->width();
-			p->setFillMode(ScPainter::None);
-			p->setStrokeMode(ScPainter::Solid);
-			p->setPen(Qt::black, lineWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-			p->drawRect(0, 0, pageWidth, pageHeight);
-			p->setAntialiasing(true);
-			p->restore();
-		}
+			DrawPageBorderSub(p, page);
 	}
 	else
 	{
@@ -1829,20 +1832,7 @@
 			QRectF drawRect = QRectF(page->xOffset() * m_viewMode.scale, page->yOffset() * m_viewMode.scale, page->width() * m_viewMode.scale + 5, page->height() * m_viewMode.scale + 5);
 			drawRect.translate(-m_doc->minCanvasCoordinate.x() * m_viewMode.scale, -m_doc->minCanvasCoordinate.y() * m_viewMode.scale);
 			if (drawRect.intersects(clip))
-			{
-				p->save();
-				p->setAntialiasing(false);
-				p->translate(page->xOffset(), page->yOffset());
-				double lineWidth = 1.0 / m_viewMode.scale;
-				double pageHeight = page->height();
-				double pageWidth = page->width();
-				p->setFillMode(ScPainter::None);
-				p->setStrokeMode(ScPainter::Solid);
-				p->setPen(Qt::black, lineWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-				p->drawRect(0, 0, pageWidth, pageHeight);
-				p->setAntialiasing(true);
-				p->restore();
-			}
+				DrawPageBorderSub(p, page);
 		}
 	}
 }
@@ -1850,6 +1840,37 @@
 /**
   draws margins
  */
+void Canvas::DrawPageMarginsGridSub(ScPainter *p, ScPage *page)
+{
+	p->save();
+	p->setAntialiasing(false);
+	p->translate(page->xOffset(), page->yOffset());
+	double lineWidth = 1.0 / m_viewMode.scale;
+	double pageHeight = page->height();
+	double pageWidth = page->width();
+	p->setFillMode(ScPainter::None);
+	p->setStrokeMode(ScPainter::Solid);
+	p->setPen(Qt::black, lineWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+	if (m_doc->guidesPrefs().marginsShown)
+	{
+		p->setPen(m_doc->guidesPrefs().marginColor);
+		if (m_doc->marginColored())
+		{
+			p->setFillMode(ScPainter::Solid);
+			p->setBrush(m_doc->guidesPrefs().marginColor);
+			p->drawRect(0, 0, pageWidth, page->Margins.Top);
+			p->drawRect(0, page->Margins.Top, page->Margins.Left, pageHeight - page->Margins.Top);
+			p->drawRect(page->Margins.Left, pageHeight - page->Margins.Bottom, pageWidth - page->Margins.Right - page->Margins.Left, page->Margins.Bottom);
+			p->drawRect(pageWidth - page->Margins.Right, page->Margins.Top, page->Margins.Right, pageHeight-page->Margins.Top);
+			p->setFillMode(ScPainter::None);
+		}
+		p->setFillMode(ScPainter::None);
+		p->drawRect(page->Margins.Left, page->Margins.Top, pageWidth - page->Margins.Left - page->Margins.Right, pageHeight - page->Margins.Top - page->Margins.Bottom);
+	}
+	p->setAntialiasing(true);
+	p->restore();
+}
+
 void Canvas::DrawPageMargins(ScPainter *p, QRectF clip, bool master)
 {
 	if (master)
@@ -1862,35 +1883,7 @@
 		QRectF drawRect = QRectF(x, y, w+5, h+5);
 		drawRect.translate(-m_doc->minCanvasCoordinate.x() * m_viewMode.scale, -m_doc->minCanvasCoordinate.y() * m_viewMode.scale);
 		if (drawRect.intersects(clip))
-		{
-			p->save();
-			p->setAntialiasing(false);
-			p->translate(page->xOffset(), page->yOffset());
-			double lineWidth = 1.0 / m_viewMode.scale;
-			double pageHeight = page->height();
-			double pageWidth = page->width();
-			p->setFillMode(ScPainter::None);
-			p->setStrokeMode(ScPainter::Solid);
-			p->setPen(Qt::black, lineWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-			if (m_doc->guidesPrefs().marginsShown)
-			{
-				p->setPen(m_doc->guidesPrefs().marginColor);
-				if (m_doc->marginColored())
-				{
-					p->setFillMode(ScPainter::Solid);
-					p->setBrush(m_doc->guidesPrefs().marginColor);
-					p->drawRect(0, 0, pageWidth, page->Margins.Top);
-					p->drawRect(0, page->Margins.Top, page->Margins.Left, pageHeight - page->Margins.Top);
-					p->drawRect(page->Margins.Left, pageHeight - page->Margins.Bottom, pageWidth - page->Margins.Right - page->Margins.Left, page->Margins.Bottom);
-					p->drawRect(pageWidth - page->Margins.Right, page->Margins.Top, page->Margins.Right, pageHeight-page->Margins.Top);
-					p->setFillMode(ScPainter::None);
-				}
-				p->setFillMode(ScPainter::None);
-				p->drawRect(page->Margins.Left, page->Margins.Top, pageWidth - page->Margins.Left - page->Margins.Right, pageHeight - page->Margins.Top - page->Margins.Bottom);
-			}
-			p->setAntialiasing(true);
-			p->restore();
-		}
+			DrawPageMarginsGridSub(p, page);
 	}
 	else
 	{
@@ -1901,35 +1894,7 @@
 			QRectF drawRect = QRectF(page->xOffset() * m_viewMode.scale, page->yOffset() * m_viewMode.scale, page->width() * m_viewMode.scale + 5, page->height() * m_viewMode.scale + 5);
 			drawRect.translate(-m_doc->minCanvasCoordinate.x() * m_viewMode.scale, -m_doc->minCanvasCoordinate.y() * m_viewMode.scale);
 			if (drawRect.intersects(clip))
-			{
-				p->save();
-				p->setAntialiasing(false);
-				p->translate(page->xOffset(), page->yOffset());
-				double lineWidth = 1.0 / m_viewMode.scale;
-				double pageHeight = page->height();
-				double pageWidth = page->width();
-				p->setFillMode(ScPainter::None);
-				p->setStrokeMode(ScPainter::Solid);
-				p->setPen(Qt::black, lineWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-				if (m_doc->guidesPrefs().marginsShown)
-				{
-					p->setPen(m_doc->guidesPrefs().marginColor);
-					if (m_doc->marginColored())
-					{
-						p->setFillMode(ScPainter::Solid);
-						p->setBrush(m_doc->guidesPrefs().marginColor);
-						p->drawRect(0, 0, pageWidth, page->Margins.Top);
-						p->drawRect(0, page->Margins.Top, page->Margins.Left, pageHeight - page->Margins.Top);
-						p->drawRect(page->Margins.Left, pageHeight - page->Margins.Bottom, pageWidth - page->Margins.Right - page->Margins.Left, page->Margins.Bottom);
-						p->drawRect(pageWidth - page->Margins.Right, page->Margins.Top, page->Margins.Right, pageHeight-page->Margins.Top);
-						p->setFillMode(ScPainter::None);
-					}
-					p->setFillMode(ScPainter::None);
-					p->drawRect(page->Margins.Left, page->Margins.Top, pageWidth - page->Margins.Left - page->Margins.Right, pageHeight - page->Margins.Top - page->Margins.Bottom);
-				}
-				p->setAntialiasing(true);
-				p->restore();
-			}
+				DrawPageMarginsGridSub(p, page);
 		}
 	}
 }
@@ -1937,6 +1902,27 @@
 /**
   draws baseline grid
  */
+void Canvas::DrawPageBaselineGridSub(ScPainter *p, ScPage *page)
+{
+	p->save();
+	p->setAntialiasing(false);
+	p->translate(page->xOffset(), page->yOffset());
+	double lineWidth = 1.0 / m_viewMode.scale;
+	double pageHeight = page->height();
+	double pageWidth = page->width();
+	p->setFillMode(ScPainter::None);
+	p->setStrokeMode(ScPainter::Solid);
+	p->setPen(Qt::black, lineWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+	if (m_doc->guidesPrefs().baselineGridShown)
+	{
+		p->setPen(m_doc->guidesPrefs().baselineGridColor, lineWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+		for (double yg = m_doc->guidesPrefs().offsetBaselineGrid; yg < pageHeight; yg += m_doc->guidesPrefs().valueBaselineGrid)
+			p->drawLine(FPoint(0, yg), FPoint(pageWidth, yg));
+	}
+	p->setAntialiasing(true);
+	p->restore();
+}
+
 void Canvas::DrawPageBaselineGrid(ScPainter *p, QRectF clip, bool master)
 {
 	if (master)
@@ -1949,25 +1935,7 @@
 		QRectF drawRect = QRectF(x, y, w+5, h+5);
 		drawRect.translate(-m_doc->minCanvasCoordinate.x() * m_viewMode.scale, -m_doc->minCanvasCoordinate.y() * m_viewMode.scale);
 		if (drawRect.intersects(clip))
-		{
-			p->save();
-			p->setAntialiasing(false);
-			p->translate(page->xOffset(), page->yOffset());
-			double lineWidth = 1.0 / m_viewMode.scale;
-			double pageHeight = page->height();
-			double pageWidth = page->width();
-			p->setFillMode(ScPainter::None);
-			p->setStrokeMode(ScPainter::Solid);
-			p->setPen(Qt::black, lineWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-			if (m_doc->guidesPrefs().baselineGridShown)
-			{
-				p->setPen(m_doc->guidesPrefs().baselineGridColor, lineWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-				for (double yg = m_doc->guidesPrefs().offsetBaselineGrid; yg < pageHeight; yg += m_doc->guidesPrefs().valueBaselineGrid)
-					p->drawLine(FPoint(0, yg), FPoint(pageWidth, yg));
-			}
-			p->setAntialiasing(true);
-			p->restore();
-		}
+			DrawPageBaselineGridSub(p, page);
 	}
 	else
 	{
@@ -1978,25 +1946,7 @@
 			QRectF drawRect = QRectF(page->xOffset() * m_viewMode.scale, page->yOffset() * m_viewMode.scale, page->width() * m_viewMode.scale + 5, page->height() * m_viewMode.scale + 5);
 			drawRect.translate(-m_doc->minCanvasCoordinate.x() * m_viewMode.scale, -m_doc->minCanvasCoordinate.y() * m_viewMode.scale);
 			if (drawRect.intersects(clip))
-			{
-				p->save();
-				p->setAntialiasing(false);
-				p->translate(page->xOffset(), page->yOffset());
-				double lineWidth = 1.0 / m_viewMode.scale;
-				double pageHeight = page->height();
-				double pageWidth = page->width();
-				p->setFillMode(ScPainter::None);
-				p->setStrokeMode(ScPainter::Solid);
-				p->setPen(Qt::black, lineWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-				if (m_doc->guidesPrefs().baselineGridShown)
-				{
-					p->setPen(m_doc->guidesPrefs().baselineGridColor, lineWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-					for (double yg = m_doc->guidesPrefs().offsetBaselineGrid; yg < pageHeight; yg += m_doc->guidesPrefs().valueBaselineGrid)
-						p->drawLine(FPoint(0, yg), FPoint(pageWidth, yg));
-				}
-				p->setAntialiasing(true);
-				p->restore();
-			}
+				DrawPageBaselineGridSub(p, page);
 		}
 	}
 }
@@ -2004,6 +1954,98 @@
 /**
   draws grid
  */
+void Canvas::DrawPageGridSub(ScPainter *p, ScPage *page, QRectF clip)
+{
+	p->save();
+	FPointArray PoLine;
+	getClipPathForPages(&PoLine);
+	p->beginLayer(1.0, 0, &PoLine);
+	p->setAntialiasing(false);
+	p->translate(page->xOffset(), page->yOffset());
+	double lineWidth = 1.0 / m_viewMode.scale;
+	double pageHeight = page->height();
+	double pageWidth = page->width();
+	p->setFillMode(ScPainter::None);
+	p->setStrokeMode(ScPainter::Solid);
+	p->setPen(Qt::black, lineWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+	if (m_doc->guidesPrefs().gridShown)
+	{
+		double lowerBx = qMax(clip.x() / m_viewMode.scale + m_doc->minCanvasCoordinate.x() - page->xOffset(), 0.0);
+		double lowerBy = qMax(clip.y() / m_viewMode.scale + m_doc->minCanvasCoordinate.y() - page->yOffset(), 0.0);
+		double highBx = qMin(lowerBx + clip.width() / m_viewMode.scale, pageWidth);
+		double highBy = qMin(lowerBy + clip.height() / m_viewMode.scale, pageHeight);
+		if (m_viewMode.scale > 0.49)
+		{
+			if (m_doc->guidesPrefs().gridType == 0)
+			{
+				double i,start;
+				i = m_doc->guidesPrefs().majorGridSpacing;
+				p->setPen(m_doc->guidesPrefs().majorGridColor, lineWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+				start = floor(lowerBy / i);
+				start *= i;
+				for (double b = start; b <= highBy; b+=i)
+				{
+					p->drawLine(FPoint(qMax(lowerBx, 0.0), b), FPoint(qMin(pageWidth, highBx), b));
+				}
+				start=floor(lowerBx/i);
+				start*=i;
+				for (double b = start; b <= highBx; b+=i)
+				{
+					p->drawLine(FPoint(b, qMax(lowerBy, 0.0)), FPoint(b, qMin(pageHeight, highBy)));
+				}
+				i = m_doc->guidesPrefs().minorGridSpacing;
+				p->setPen(m_doc->guidesPrefs().minorGridColor, lineWidth, Qt::DotLine, Qt::FlatCap, Qt::MiterJoin);
+				start = floor(lowerBy / i);
+				start *= i;
+				for (double b = start; b <= highBy; b+=i)
+				{
+					p->drawLine(FPoint(qMax(lowerBx, 0.0), b), FPoint(qMin(pageWidth, highBx), b));
+				}
+				start=floor(lowerBx/i);
+				start*=i;
+				for (double b = start; b <= highBx; b+=i)
+				{
+					p->drawLine(FPoint(b, qMax(lowerBy, 0.0)), FPoint(b, qMin(pageHeight, highBy)));
+				}
+			}
+			else if (m_doc->guidesPrefs().gridType == 1)
+			{
+				double i, startX, startY;
+				i = m_doc->guidesPrefs().minorGridSpacing;
+				p->setPen(m_doc->guidesPrefs().minorGridColor, 3.0 / m_viewMode.scale, Qt::SolidLine, Qt::RoundCap, Qt::MiterJoin);
+				startY = floor(lowerBy / i);
+				startY *= i;
+				startX = floor(lowerBx / i);
+				startX *= i;
+				for (double b = startY; b <= highBy; b += i)
+				{
+					for (double bb = startX; bb <= highBx; bb += i)
+					{
+						p->drawLine(FPoint(bb, b), FPoint(bb, b));
+					}
+				}
+				i = m_doc->guidesPrefs().majorGridSpacing;
+				p->setPen(m_doc->guidesPrefs().minorGridColor, lineWidth * 2, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+				startY = floor(lowerBy / i);
+				startY *= i;
+				startX = floor(lowerBx / i);
+				startX *= i;
+				for (double b = startY; b <= highBy; b += i)
+				{
+					for (double bb = startX; bb <= highBx; bb += i)
+					{
+						p->drawLine(FPoint(bb - 4, b), FPoint(bb + 4, b));
+						p->drawLine(FPoint(bb, b - 4), FPoint(bb, b + 4));
+					}
+				}
+			}
+		}
+	}
+	p->setAntialiasing(true);
+	p->endLayer();
+	p->restore();
+}
+
 void Canvas::DrawPageGrid(ScPainter *p, QRectF clip, bool master)
 {
 	if (master)
@@ -2016,86 +2058,7 @@
 		QRectF drawRect = QRectF(x, y, w+5, h+5);
 		drawRect.translate(-m_doc->minCanvasCoordinate.x() * m_viewMode.scale, -m_doc->minCanvasCoordinate.y() * m_viewMode.scale);
 		if (drawRect.intersects(clip))
-		{
-			p->save();
-			p->setAntialiasing(false);
-			p->translate(page->xOffset(), page->yOffset());
-			double lineWidth = 1.0 / m_viewMode.scale;
-			double pageHeight = page->height();
-			double pageWidth = page->width();
-			p->setFillMode(ScPainter::None);
-			p->setStrokeMode(ScPainter::Solid);
-			p->setPen(Qt::black, lineWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-			if (m_doc->guidesPrefs().gridShown)
-			{
-				double lowerBx = qMax(clip.x() / m_viewMode.scale + m_doc->minCanvasCoordinate.x() - page->xOffset(), 0.0);
-				double lowerBy = qMax(clip.y() / m_viewMode.scale + m_doc->minCanvasCoordinate.y() - page->yOffset(), 0.0);
-				double highBx = qMin(lowerBx + clip.width() / m_viewMode.scale, pageWidth);
-				double highBy = qMin(lowerBy + clip.height() / m_viewMode.scale, pageHeight);
-				if (m_viewMode.scale > 0.49)
-				{
-				/*	double i, startX, startY;
-					i = m_doc->guidesPrefs().minorGridSpacing;
-					p->setPen(m_doc->guidesPrefs().minorGridColor, 3.0 / m_viewMode.scale, Qt::SolidLine, Qt::RoundCap, Qt::MiterJoin);
-					startY = floor(lowerBy / i);
-					startY *= i;
-					startX = floor(lowerBx / i);
-					startX *= i;
-					for (double b = startY; b <= highBy; b += i)
-					{
-						for (double bb = startX; bb <= highBx; bb += i)
-						{
-							p->drawLine(FPoint(bb, b), FPoint(bb, b));
-						}
-					}
-					i = m_doc->guidesPrefs().majorGridSpacing;
-					p->setPen(m_doc->guidesPrefs().minorGridColor, lineWidth * 2, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-					startY = floor(lowerBy / i);
-					startY *= i;
-					startX = floor(lowerBx / i);
-					startX *= i;
-					for (double b = startY; b <= highBy; b += i)
-					{
-						for (double bb = startX; bb <= highBx; bb += i)
-						{
-							p->drawLine(FPoint(bb - 4, b), FPoint(bb + 4, b));
-							p->drawLine(FPoint(bb, b - 4), FPoint(bb, b + 4));
-						}
-					} */
-					double i,start;
-					i = m_doc->guidesPrefs().majorGridSpacing;
-					p->setPen(m_doc->guidesPrefs().majorGridColor, lineWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-					start = floor(lowerBy / i);
-					start *= i;
-					for (double b = start; b <= highBy; b+=i)
-					{
-						p->drawLine(FPoint(qMax(lowerBx, 0.0), b), FPoint(qMin(pageWidth, highBx), b));
-					}
-					start=floor(lowerBx/i);
-					start*=i;
-					for (double b = start; b <= highBx; b+=i)
-					{
-						p->drawLine(FPoint(b, qMax(lowerBy, 0.0)), FPoint(b, qMin(pageHeight, highBy)));
-					}
-					i = m_doc->guidesPrefs().minorGridSpacing;
-					p->setPen(m_doc->guidesPrefs().minorGridColor, lineWidth, Qt::DotLine, Qt::FlatCap, Qt::MiterJoin);
-					start = floor(lowerBy / i);
-					start *= i;
-					for (double b = start; b <= highBy; b+=i)
-					{
-						p->drawLine(FPoint(qMax(lowerBx, 0.0), b), FPoint(qMin(pageWidth, highBx), b));
-					}
-					start=floor(lowerBx/i);
-					start*=i;
-					for (double b = start; b <= highBx; b+=i)
-					{
-						p->drawLine(FPoint(b, qMax(lowerBy, 0.0)), FPoint(b, qMin(pageHeight, highBy)));
-					}
-				}
-			}
-			p->setAntialiasing(true);
-			p->restore();
-		}
+			DrawPageGridSub(p, page, clip);
 	}
 	else
 	{
@@ -2106,86 +2069,7 @@
 			QRectF drawRect = QRectF(page->xOffset() * m_viewMode.scale, page->yOffset() * m_viewMode.scale, page->width() * m_viewMode.scale + 5, page->height() * m_viewMode.scale + 5);
 			drawRect.translate(-m_doc->minCanvasCoordinate.x() * m_viewMode.scale, -m_doc->minCanvasCoordinate.y() * m_viewMode.scale);
 			if (drawRect.intersects(clip))
-			{
-				p->save();
-				p->setAntialiasing(false);
-				p->translate(page->xOffset(), page->yOffset());
-				double lineWidth = 1.0 / m_viewMode.scale;
-				double pageHeight = page->height();
-				double pageWidth = page->width();
-				p->setFillMode(ScPainter::None);
-				p->setStrokeMode(ScPainter::Solid);
-				p->setPen(Qt::black, lineWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-				if (m_doc->guidesPrefs().gridShown)
-				{
-					double lowerBx = qMax(clip.x() / m_viewMode.scale + m_doc->minCanvasCoordinate.x() - page->xOffset(), 0.0);
-					double lowerBy = qMax(clip.y() / m_viewMode.scale + m_doc->minCanvasCoordinate.y() - page->yOffset(), 0.0);
-					double highBx = qMin(lowerBx + clip.width() / m_viewMode.scale, pageWidth);
-					double highBy = qMin(lowerBy + clip.height() / m_viewMode.scale, pageHeight);
-					if (m_viewMode.scale > 0.49)
-					{
-					/*	double i, startX, startY;
-						i = m_doc->guidesPrefs().minorGridSpacing;
-						p->setPen(m_doc->guidesPrefs().minorGridColor, 3.0 / m_viewMode.scale, Qt::SolidLine, Qt::RoundCap, Qt::MiterJoin);
-						startY = floor(lowerBy / i);
-						startY *= i;
-						startX = floor(lowerBx / i);
-						startX *= i;
-						for (double b = startY; b <= highBy; b += i)
-						{
-							for (double bb = startX; bb <= highBx; bb += i)
-							{
-								p->drawLine(FPoint(bb, b), FPoint(bb, b));
-							}
-						}
-						i = m_doc->guidesPrefs().majorGridSpacing;
-						p->setPen(m_doc->guidesPrefs().minorGridColor, lineWidth * 2, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-						startY = floor(lowerBy / i);
-						startY *= i;
-						startX = floor(lowerBx / i);
-						startX *= i;
-						for (double b = startY; b <= highBy; b += i)
-						{
-							for (double bb = startX; bb <= highBx; bb += i)
-							{
-								p->drawLine(FPoint(bb - 4, b), FPoint(bb + 4, b));
-								p->drawLine(FPoint(bb, b - 4), FPoint(bb, b + 4));
-							}
-						} */
-						double i,start;
-						i = m_doc->guidesPrefs().majorGridSpacing;
-						p->setPen(m_doc->guidesPrefs().majorGridColor, lineWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-						start = floor(lowerBy / i);
-						start *= i;
-						for (double b = start; b <= highBy; b+=i)
-						{
-							p->drawLine(FPoint(qMax(lowerBx, 0.0), b), FPoint(qMin(pageWidth, highBx), b));
-						}
-						start=floor(lowerBx/i);
-						start*=i;
-						for (double b = start; b <= highBx; b+=i)
-						{
-							p->drawLine(FPoint(b, qMax(lowerBy, 0.0)), FPoint(b, qMin(pageHeight, highBy)));
-						}
-						i = m_doc->guidesPrefs().minorGridSpacing;
-						p->setPen(m_doc->guidesPrefs().minorGridColor, lineWidth, Qt::DotLine, Qt::FlatCap, Qt::MiterJoin);
-						start = floor(lowerBy / i);
-						start *= i;
-						for (double b = start; b <= highBy; b+=i)
-						{
-							p->drawLine(FPoint(qMax(lowerBx, 0.0), b), FPoint(qMin(pageWidth, highBx), b));
-						}
-						start=floor(lowerBx/i);
-						start*=i;
-						for (double b = start; b <= highBx; b+=i)
-						{
-							p->drawLine(FPoint(b, qMax(lowerBy, 0.0)), FPoint(b, qMin(pageHeight, highBy)));
-						}
-					}
-				}
-				p->setAntialiasing(true);
-				p->restore();
-			}
+				DrawPageGridSub(p, page, clip);
 		}
 	}
 }
@@ -2193,6 +2077,21 @@
 /**
   draws guides
  */
+void Canvas::DrawPageGuidesSub(ScPainter *p, ScPage *page)
+{
+	p->save();
+	p->setAntialiasing(false);
+	p->translate(page->xOffset(), page->yOffset());
+	double lineWidth = 1.0 / m_viewMode.scale;
+	p->setFillMode(ScPainter::None);
+	p->setStrokeMode(ScPainter::Solid);
+	p->setPen(Qt::black, lineWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+	if (m_doc->guidesPrefs().guidesShown)
+		page->guides.drawPage(p, m_doc, lineWidth);
+	p->setAntialiasing(true);
+	p->restore();
+}
+
 void Canvas::DrawPageGuides(ScPainter *p, QRectF clip, bool master)
 {
 	if (master)
@@ -2205,19 +2104,7 @@
 		QRectF drawRect = QRectF(x, y, w+5, h+5);
 		drawRect.translate(-m_doc->minCanvasCoordinate.x() * m_viewMode.scale, -m_doc->minCanvasCoordinate.y() * m_viewMode.scale);
 		if (drawRect.intersects(clip))
-		{
-			p->save();
-			p->setAntialiasing(false);
-			p->translate(page->xOffset(), page->yOffset());
-			double lineWidth = 1.0 / m_viewMode.scale;
-			p->setFillMode(ScPainter::None);
-			p->setStrokeMode(ScPainter::Solid);
-			p->setPen(Qt::black, lineWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-			if (m_doc->guidesPrefs().guidesShown)
-				page->guides.drawPage(p, m_doc, lineWidth);
-			p->setAntialiasing(true);
-			p->restore();
-		}
+			DrawPageGuidesSub(p, page);
 	}
 	else
 	{
@@ -2228,19 +2115,7 @@
 			QRectF drawRect = QRectF(page->xOffset() * m_viewMode.scale, page->yOffset() * m_viewMode.scale, page->width() * m_viewMode.scale + 5, page->height() * m_viewMode.scale + 5);
 			drawRect.translate(-m_doc->minCanvasCoordinate.x() * m_viewMode.scale, -m_doc->minCanvasCoordinate.y() * m_viewMode.scale);
 			if (drawRect.intersects(clip))
-			{
-				p->save();
-				p->setAntialiasing(false);
-				p->translate(page->xOffset(), page->yOffset());
-				double lineWidth = 1.0 / m_viewMode.scale;
-				p->setFillMode(ScPainter::None);
-				p->setStrokeMode(ScPainter::Solid);
-				p->setPen(Qt::black, lineWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-				if (m_doc->guidesPrefs().guidesShown)
-					page->guides.drawPage(p, m_doc, lineWidth);
-				p->setAntialiasing(true);
-				p->restore();
-			}
+				DrawPageGuidesSub(p, page);
 		}
 	}
 }
@@ -2248,6 +2123,23 @@
 /**
   draws actual page indicator frame
  */
+void Canvas::DrawPageIndicatorSub(ScPainter *p, ScPage *page)
+{
+	p->save();
+	p->setAntialiasing(false);
+	p->translate(page->xOffset(), page->yOffset());
+	double lineWidth = 1.0 / m_viewMode.scale;
+	double pageHeight = page->height();
+	double pageWidth = page->width();
+	p->setFillMode(ScPainter::None);
+	p->setStrokeMode(ScPainter::Solid);
+	p->setPen(Qt::black, lineWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+	p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.pageBorderColor, 1 / m_viewMode.scale, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+	p->drawRect(0, 0, pageWidth, pageHeight);
+	p->setAntialiasing(true);
+	p->restore();
+}
+
 void Canvas::DrawPageIndicator(ScPainter *p, QRectF clip, bool master)
 {
 	if (master)
@@ -2260,21 +2152,7 @@
 		QRectF drawRect = QRectF(x, y, w+5, h+5);
 		drawRect.translate(-m_doc->minCanvasCoordinate.x() * m_viewMode.scale, -m_doc->minCanvasCoordinate.y() * m_viewMode.scale);
 		if (drawRect.intersects(clip))
-		{
-			p->save();
-			p->setAntialiasing(false);
-			p->translate(page->xOffset(), page->yOffset());
-			double lineWidth = 1.0 / m_viewMode.scale;
-			double pageHeight = page->height();
-			double pageWidth = page->width();
-			p->setFillMode(ScPainter::None);
-			p->setStrokeMode(ScPainter::Solid);
-			p->setPen(Qt::black, lineWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-			p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.pageBorderColor, 1 / m_viewMode.scale, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-			p->drawRect(0, 0, pageWidth, pageHeight);
-			p->setAntialiasing(true);
-			p->restore();
-		}
+			DrawPageIndicatorSub(p, page);
 	}
 	else
 	{
@@ -2282,26 +2160,12 @@
 		for (uint a = 0; a < docPagesCount; ++a)
 		{
 			ScPage *page = m_doc->Pages->at(a);
-			QRectF drawRect = QRectF(page->xOffset() * m_viewMode.scale, page->yOffset() * m_viewMode.scale, page->width() * m_viewMode.scale + 5, page->height() * m_viewMode.scale + 5);
-			drawRect.translate(-m_doc->minCanvasCoordinate.x() * m_viewMode.scale, -m_doc->minCanvasCoordinate.y() * m_viewMode.scale);
-			if (drawRect.intersects(clip))
-			{
-				p->save();
-				p->setAntialiasing(false);
-				p->translate(page->xOffset(), page->yOffset());
-				double lineWidth = 1.0 / m_viewMode.scale;
-				double pageHeight = page->height();
-				double pageWidth = page->width();
-				p->setFillMode(ScPainter::None);
-				p->setStrokeMode(ScPainter::Solid);
-				p->setPen(Qt::black, lineWidth, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-				if (m_doc->currentPage() == page)
-				{
-					p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.pageBorderColor, 1 / m_viewMode.scale, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-					p->drawRect(0, 0, pageWidth, pageHeight);
-				}
-				p->setAntialiasing(true);
-				p->restore();
+			if (page == m_doc->currentPage())
+			{
+				QRectF drawRect = QRectF(page->xOffset() * m_viewMode.scale, page->yOffset() * m_viewMode.scale, page->width() * m_viewMode.scale + 5, page->height() * m_viewMode.scale + 5);
+				drawRect.translate(-m_doc->minCanvasCoordinate.x() * m_viewMode.scale, -m_doc->minCanvasCoordinate.y() * m_viewMode.scale);
+				if (drawRect.intersects(clip))
+					DrawPageIndicatorSub(p, page);
 			}
 		}
 	}

Modified: trunk/Scribus/scribus/canvas.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16992&path=/trunk/Scribus/scribus/canvas.h
==============================================================================
--- trunk/Scribus/scribus/canvas.h (original)
+++ trunk/Scribus/scribus/canvas.h Sun Nov 20 09:25:31 2011
@@ -213,11 +213,17 @@
 	void setupEditHRuler(PageItem * item, bool forceAndReset = false);
 	
 private:
+	void DrawPageBorderSub(ScPainter *p, ScPage *page);
 	void DrawPageBorder(ScPainter *p, QRectF clip, bool master = false);
+	void DrawPageMarginsGridSub(ScPainter *p, ScPage *page);
 	void DrawPageMargins(ScPainter *p, QRectF clip, bool master = false);
+	void DrawPageBaselineGridSub(ScPainter *p, ScPage *page);
 	void DrawPageBaselineGrid(ScPainter *p, QRectF clip, bool master = false);
+	void DrawPageGridSub(ScPainter *p, ScPage *page, QRectF clip);
 	void DrawPageGrid(ScPainter *p, QRectF clip, bool master = false);
+	void DrawPageGuidesSub(ScPainter *p, ScPage *page);
 	void DrawPageGuides(ScPainter *p, QRectF clip, bool master = false);
+	void DrawPageIndicatorSub(ScPainter *p, ScPage *page);
 	void DrawPageIndicator(ScPainter *p, QRectF clip, bool master = false);
 	void drawLinkFrameLine(ScPainter* painter, FPoint &start, FPoint &end);
 	void PaintSizeRect(QRect neu);

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16992&path=/trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp Sun Nov 20 09:25:31 2011
@@ -803,6 +803,7 @@
 		m_Doc->guidesPrefs().showControls = false;
 		m_Doc->guidesPrefs().renderStackOrder.clear();
 		m_Doc->guidesPrefs().renderStackOrder << 0 << 1 << 2 << 3 << 4;
+		m_Doc->guidesPrefs().gridType = 0;
 // 		DoFonts.clear();
 		m_Doc->itemToolPrefs().textSize=qRound(ScCLocale::toDoubleC(dc.attribute("DSIZE")) * 10);
 		Defont=dc.attribute("DFONT");

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16992&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 Sun Nov 20 09:25:31 2011
@@ -952,6 +952,7 @@
 		doc->guidesPrefs().renderStackOrder << 0 << 1 << 2 << 3 << 4;
 	else
 		doc->guidesPrefs().renderStackOrder << 4 << 0 << 1 << 2 << 3;
+	doc->guidesPrefs().gridType = 0;
 	doc->guidesPrefs().guideRad = attrs.valueAsDouble("GuideRad", 10.0);
 	doc->guidesPrefs().grabRadius  = attrs.valueAsInt("GRAB", 4);
 }

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16992&path=/trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp Sun Nov 20 09:25:31 2011
@@ -429,6 +429,7 @@
 			m_Doc->guidesPrefs().renderStackOrder << 0 << 1 << 2 << 3 << 4;
 		else
 			m_Doc->guidesPrefs().renderStackOrder << 4 << 0 << 1 << 2 << 3;
+		m_Doc->guidesPrefs().gridType = 0;
 		m_Doc->guidesPrefs().guideRad = ScCLocale::toDoubleC(dc.attribute("GuideRad"), 10.0);
 		m_Doc->guidesPrefs().grabRadius  = dc.attribute("GRAB", "4").toInt();
 		if (dc.hasAttribute("currentProfile"))

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16992&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 Sun Nov 20 09:25:31 2011
@@ -1989,6 +1989,7 @@
 			doc->guidesPrefs().renderStackOrder << val.toInt();
 		}
 	}
+	doc->guidesPrefs().gridType = attrs.valueAsInt("GridType", 0);
 	doc->guidesPrefs().guideRad = attrs.valueAsDouble("GuideRad", 10.0);
 	doc->guidesPrefs().grabRadius  = attrs.valueAsInt("GRAB", 4);
 }

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16992&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 Sun Nov 20 09:25:31 2011
@@ -338,6 +338,7 @@
 		renderStack += QString("%1 ").arg(m_Doc->guidesPrefs().renderStackOrder[r]);
 	}
 	docu.writeAttribute("renderStack", renderStack.trimmed());
+	docu.writeAttribute("GridType", m_Doc->guidesPrefs().gridType);
 	docu.writeAttribute("PAGEC",m_Doc->paperColor().name());
 	docu.writeAttribute("MARGC",m_Doc->guidesPrefs().marginColor.name());
 	docu.writeAttribute("RANDF", static_cast<int>(m_Doc->marginColored()));

Modified: trunk/Scribus/scribus/prefsmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16992&path=/trunk/Scribus/scribus/prefsmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/prefsmanager.cpp (original)
+++ trunk/Scribus/scribus/prefsmanager.cpp Sun Nov 20 09:25:31 2011
@@ -183,6 +183,7 @@
 	appPrefs.guidesPrefs.guideColor = QColor(Qt::darkBlue);
 	appPrefs.guidesPrefs.baselineGridColor = QColor(Qt::lightGray);
 	appPrefs.guidesPrefs.renderStackOrder << 0 << 1 << 2 << 3 << 4;
+	appPrefs.guidesPrefs.gridType = 0;
 	appPrefs.typoPrefs.valueSuperScript = 33;
 	appPrefs.typoPrefs.scalingSuperScript = 66;
 	appPrefs.typoPrefs.valueSubScript = 33;
@@ -1347,6 +1348,7 @@
 	}
 	renderStack = renderStack.trimmed();
 	deGuides.setAttribute("renderStack", renderStack);
+	deGuides.setAttribute("GridType", appPrefs.guidesPrefs.gridType);
 	deGuides.setAttribute("ShowGrid", static_cast<int>(appPrefs.guidesPrefs.gridShown));
 	deGuides.setAttribute("BaselineGridDistance", ScCLocale::toQStringC(appPrefs.guidesPrefs.valueBaselineGrid));
 	deGuides.setAttribute("BaselineGridOffset", ScCLocale::toQStringC(appPrefs.guidesPrefs.offsetBaselineGrid));
@@ -1997,6 +1999,7 @@
 					appPrefs.guidesPrefs.renderStackOrder << val.toInt();
 				}
 			}
+			appPrefs.guidesPrefs.gridType = dc.attribute("GridType", "0").toInt();
 			appPrefs.guidesPrefs.gridShown = static_cast<bool>(dc.attribute("ShowGrid", "0").toInt());
 			if (dc.hasAttribute("GuideC"))
 				appPrefs.guidesPrefs.guideColor = QColor(dc.attribute("GuideC"));

Modified: trunk/Scribus/scribus/prefsstructs.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16992&path=/trunk/Scribus/scribus/prefsstructs.h
==============================================================================
--- trunk/Scribus/scribus/prefsstructs.h (original)
+++ trunk/Scribus/scribus/prefsstructs.h Sun Nov 20 09:25:31 2011
@@ -140,6 +140,9 @@
 	// render stack id 2 = Grid
 	// render stack id 3 = Guides
 	// render stack id 4 = Items
+	int gridType;
+	// type 0 lines
+	// type 1 crosses and dots
 
 	int grabRadius;
 	double guideRad;

Modified: trunk/Scribus/scribus/ui/prefs_guides.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16992&path=/trunk/Scribus/scribus/ui/prefs_guides.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_guides.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_guides.cpp Sun Nov 20 09:25:31 2011
@@ -31,6 +31,7 @@
 	connect(buttonUp, SIGNAL(clicked()), this, SLOT(moveUp()));
 	connect(buttonDown, SIGNAL(clicked()), this, SLOT(moveDown()));
 	connect(guidePlacementListBox, SIGNAL(itemPressed(QListWidgetItem*)), this, SLOT(select(QListWidgetItem*)));
+	connect(visibilityGridCheckBox, SIGNAL(clicked()), this, SLOT(gridClicked()));
 }
 
 Prefs_Guides::~Prefs_Guides()
@@ -58,6 +59,11 @@
 		item->setData(Qt::UserRole, it);
 		item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
 	}
+	int grTy = gridTypeCombo->currentIndex();
+	gridTypeCombo->clear();
+	gridTypeCombo->addItem( tr("Lines"));
+	gridTypeCombo->addItem( tr("Crosses and Dots"));
+	gridTypeCombo->setCurrentIndex(grTy);
 	guidePlacementListBox->setToolTip( tr( "Place guides in front of or behind objects on the page" ) );
 	minorGridSpacingSpinBox->setToolTip( tr( "Distance between the minor grid lines" ) );
 	majorGridSpacingSpinBox->setToolTip( tr( "Distance between the major grid lines" ) );
@@ -120,6 +126,7 @@
 	visibilityGridCheckBox->setChecked(prefsData->guidesPrefs.gridShown);
 	visibilityBaselineGridCheckBox->setChecked(prefsData->guidesPrefs.baselineGridShown);
 
+	gridTypeCombo->setCurrentIndex(prefsData->guidesPrefs.gridType);
 	majorGridSpacingSpinBox->setValue(prefsData->guidesPrefs.majorGridSpacing * unitRatio);
 	minorGridSpacingSpinBox->setValue(prefsData->guidesPrefs.minorGridSpacing * unitRatio);
 	baselineGridSpacingSpinBox->setValue(prefsData->guidesPrefs.valueBaselineGrid);
@@ -151,6 +158,7 @@
 	colorBaselineGrid = prefsData->guidesPrefs.baselineGridColor;
 	baselineGridColorPushButton->setText( QString::null );
 	baselineGridColorPushButton->setIcon(pm);
+	gridTypeCombo->setEnabled(visibilityGridCheckBox->isChecked());
 }
 
 void Prefs_Guides::saveGuiToPrefs(struct ApplicationPrefs *prefsData) const
@@ -172,6 +180,7 @@
 	prefsData->guidesPrefs.majorGridColor=colorMajorGrid;
 	prefsData->guidesPrefs.minorGridColor=colorMinorGrid;
 	prefsData->guidesPrefs.baselineGridColor=colorBaselineGrid;
+	prefsData->guidesPrefs.gridType = gridTypeCombo->currentIndex();
 }
 
 void Prefs_Guides::changeMajorColor()
@@ -301,3 +310,8 @@
 		buttonDown->setEnabled(true);
 	}
 }
+
+void Prefs_Guides::gridClicked()
+{
+	gridTypeCombo->setEnabled(visibilityGridCheckBox->isChecked());
+}

Modified: trunk/Scribus/scribus/ui/prefs_guides.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16992&path=/trunk/Scribus/scribus/ui/prefs_guides.h
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_guides.h (original)
+++ trunk/Scribus/scribus/ui/prefs_guides.h Sun Nov 20 09:25:31 2011
@@ -38,6 +38,7 @@
 		virtual void moveUp();
 		virtual void moveDown();
 		virtual void select(QListWidgetItem* item);
+		virtual void gridClicked();
 
 	protected:
 		QColor colorGuides;

Modified: trunk/Scribus/scribus/ui/prefs_guidesbase.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16992&path=/trunk/Scribus/scribus/ui/prefs_guidesbase.ui
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_guidesbase.ui (original)
+++ trunk/Scribus/scribus/ui/prefs_guidesbase.ui Sun Nov 20 09:25:31 2011
@@ -354,11 +354,61 @@
         </widget>
        </item>
        <item>
-        <widget class="QCheckBox" name="visibilityGridCheckBox">
-         <property name="text">
-          <string>Page Grid</string>
-         </property>
-        </widget>
+        <layout class="QHBoxLayout" name="horizontalLayout_3">
+         <item>
+          <widget class="QCheckBox" name="visibilityGridCheckBox">
+           <property name="text">
+            <string>Page Grid</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer name="horizontalSpacer_4">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeType">
+            <enum>QSizePolicy::Fixed</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>15</width>
+             <height>5</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item>
+          <widget class="QLabel" name="label_8">
+           <property name="text">
+            <string>Type:</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QComboBox" name="gridTypeCombo">
+           <property name="enabled">
+            <bool>false</bool>
+           </property>
+           <property name="frame">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </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>
+         </item>
+        </layout>
        </item>
        <item>
         <widget class="QCheckBox" name="visibilityBaselineGridCheckBox">




More information about the scribus-commit mailing list