r16824 by jghali - #10212: tweak ruler presentation to be more pleasant on eyes

scribus-commit scribus-commit at lists.scribus.net
Mon Sep 12 21:10:25 UTC 2011


Author: jghali
Date: Mon Sep 12 21:10:25 2011
New Revision: 16824

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=16824
Log:
#10212: tweak ruler presentation to be more pleasant on eyes

Modified:
    trunk/Scribus/resources/icons/mover.png
    trunk/Scribus/scribus/ui/hruler.cpp
    trunk/Scribus/scribus/ui/rulermover.cpp
    trunk/Scribus/scribus/ui/vruler.cpp

Modified: trunk/Scribus/resources/icons/mover.png
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16824&path=/trunk/Scribus/resources/icons/mover.png
==============================================================================
Binary files - no diff available.

Modified: trunk/Scribus/scribus/ui/hruler.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16824&path=/trunk/Scribus/scribus/ui/hruler.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/hruler.cpp (original)
+++ trunk/Scribus/scribus/ui/hruler.cpp Mon Sep 12 21:10:25 2011
@@ -81,7 +81,7 @@
 	setBackgroundRole(QPalette::Window);
 	setAutoFillBackground(true);
 	QPalette palette;
-	palette.setBrush(QPalette::Window, QColor(255, 255, 255));
+	palette.setBrush(QPalette::Window, QColor(240, 240, 240));
 	setPalette(palette);
 	currDoc = doc;
 	currView = pa;
@@ -510,7 +510,7 @@
 	double sc = currView->scale();
 	Scaling = sc;
 	QFont ff = font();
-	ff.setPointSize(8);
+	ff.setPointSize(6);
 	setFont(ff);
 	QPainter p;
 	p.begin(this);
@@ -699,13 +699,13 @@
 {
 	p.setBrush(Qt::black);
 	p.setPen(Qt::black);
-	p.drawLine(0, 16, width(), 16);
+	//p.drawLine(0, 16, width(), 16);
 	double sc = Scaling;
 	double cc = width() / sc;
 	double firstMark = ceil(offs / iter) * iter - offs;
 	while (firstMark < cc)
 	{
-		p.drawLine(qRound(firstMark * sc), 10, qRound(firstMark * sc), 16);
+		p.drawLine(qRound(firstMark * sc), 13, qRound(firstMark * sc), 16);
 		firstMark += iter;
 	}
 	firstMark = ceil(offs / iter2) * iter2 - offs;
@@ -715,7 +715,7 @@
 	double xl, frac;
 	while (firstMark < cc)
 	{
-		p.drawLine(qRound(firstMark * sc), topline, qRound(firstMark * sc), 16);
+		p.drawLine(qRound(firstMark * sc), topline + 5, qRound(firstMark * sc), 16);
 		switch (currDoc->unitIndex())
 		{
 			case SC_MM:

Modified: trunk/Scribus/scribus/ui/rulermover.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16824&path=/trunk/Scribus/scribus/ui/rulermover.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/rulermover.cpp (original)
+++ trunk/Scribus/scribus/ui/rulermover.cpp Mon Sep 12 21:10:25 2011
@@ -41,7 +41,7 @@
 	setBackgroundRole(QPalette::Window);
 	setAutoFillBackground(true);
 	QPalette palette;
-	palette.setBrush(QPalette::Window, QColor(255, 255, 255));
+	palette.setBrush(QPalette::Window, QColor(240, 240, 240));
 	palette.setBrush(backgroundRole(), QBrush(loadIcon("mover.png")));
 	setPalette(palette);
 	currView = pa;

Modified: trunk/Scribus/scribus/ui/vruler.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16824&path=/trunk/Scribus/scribus/ui/vruler.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/vruler.cpp (original)
+++ trunk/Scribus/scribus/ui/vruler.cpp Mon Sep 12 21:10:25 2011
@@ -55,7 +55,7 @@
 	setBackgroundRole(QPalette::Window);
 	setAutoFillBackground(true);
 	QPalette palette;
-	palette.setBrush(QPalette::Window, QColor(255, 255, 255));
+	palette.setBrush(QPalette::Window, QColor(240, 240, 240));
 	setPalette(palette);
 	currDoc = doc;
 	currView = pa;
@@ -112,13 +112,13 @@
 	double xl, frac;
 	double sc = currView->scale();
 	QFont ff = font();
-	ff.setPointSize(8);
+	ff.setPointSize(6);
 	setFont(ff);
 	QPainter p;
 	p.begin(this);
 	p.save();
 	p.setClipRect(e->rect());
-	p.drawLine(16, 0, 16, height());
+//	p.drawLine(16, 0, 16, height());
 	p.setBrush(Qt::black);
 	p.setPen(Qt::black);
 	p.setFont(font());
@@ -126,14 +126,14 @@
 	double firstMark = ceil(offs / iter) * iter - offs;
 	while (firstMark < cc)
 	{
-		p.drawLine(10, qRound(firstMark * sc), 16, qRound(firstMark * sc));
+		p.drawLine(13, qRound(firstMark * sc), 16, qRound(firstMark * sc));
 		firstMark += iter;
 	}
 	firstMark = ceil(offs / iter2) * iter2 - offs;
 	int markC = static_cast<int>(ceil(offs / iter2));
 	while (firstMark < cc)
 	{
-		p.drawLine(3, qRound(firstMark * sc), 16, qRound(firstMark * sc));
+		p.drawLine(8, qRound(firstMark * sc), 16, qRound(firstMark * sc));
 		int textY = qRound(firstMark * sc)+10;
 		switch (currDoc->unitIndex())
 		{
@@ -253,7 +253,7 @@
 		p->drawPixmap(1*SCALE, (textY+bbox.top())*SCALE, pix, 0, 0, bbox.width()*SCALE, bbox.height()*SCALE);
 		p->scale(SCALE,SCALE);
 #endif
-		textY += 11;
+		textY += 8;
 	}
 }
 




More information about the scribus-commit mailing list