I'm attaching a tiny patch that improves the visibility of the scale number 
and unit by drawing a white background (actually, whatever colour is defined 
as background).
 I think an ideal solution would be to have a font of a certain colour with an 
outline of a different colour (like proper movie subtitles), but I couldn't 
find how to do that easily. Even this method could be better by having some 
extra background to the sides, but it seems it ignores leading and trailing 
whitespace.
Index: MapView.cpp
===================================================================
--- MapView.cpp	(revision 10950)
+++ MapView.cpp	(working copy)
@@ -231,10 +231,12 @@
 	QPointF P2(20+Length*projection().pixelPerM(),height()-20);
 	P.drawLine(P1-QPointF(0,5),P1+QPointF(0,5));
 	P.drawLine(P1,P2);
+	P.setBackgroundMode(Qt::OpaqueMode);
 	if (Length < 1000)
 		P.drawText(QRectF(P2-QPoint(100,40),QSize(200,30)),Qt::AlignHCenter | Qt::AlignBottom, QString(tr("%1 m")).arg(Length, 0, 'f', 0));
 	else
 		P.drawText(QRectF(P2-QPoint(100,40),QSize(200,30)),Qt::AlignHCenter | Qt::AlignBottom, QString(tr("%1 km")).arg(Length/1000, 0, 'f', 0));
+	P.setBackgroundMode(Qt::TransparentMode);
 
 	P.drawLine(P2-QPointF(0,5),P2+QPointF(0,5));
 }
_______________________________________________
Merkaartor mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/merkaartor

Reply via email to