[PATCH 5/7] profilegraphics.cpp: Use text sizes in plot_text()

Lubomir I. Ivanov neolit123 at gmail.com
Tue Oct 15 02:54:18 UTC 2013


From: "Lubomir I. Ivanov" <neolit123 at gmail.com>

Make the active font (fnt) use the 'size' member of the received
text_render_options_t. This allows changing the size of
certain text elements.

For the moment most text elements are set to 12px.

Signed-off-by: Lubomir I. Ivanov <neolit123 at gmail.com>
---
 qt-ui/profilegraphics.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qt-ui/profilegraphics.cpp b/qt-ui/profilegraphics.cpp
index 3f87197..8f9c8d0 100644
--- a/qt-ui/profilegraphics.cpp
+++ b/qt-ui/profilegraphics.cpp
@@ -1179,7 +1179,7 @@ QGraphicsItemGroup *ProfileGraphicsView::plot_text(text_render_options_t *tro,co
 	QFontMetrics fm(fnt);
 
 	if (printMode)
-		fnt.setPixelSize(10);
+		fnt.setPixelSize(tro->size);
 
 	QPointF point(SCALEGC(pos.x(), pos.y())); // This is neded because of the SCALE macro.
 	double dx = tro->hpos * (fm.width(text));
-- 
1.7.11.msysgit.0



More information about the subsurface mailing list