aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/profilegraphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/profilegraphics.cpp')
-rw-r--r--qt-ui/profilegraphics.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/qt-ui/profilegraphics.cpp b/qt-ui/profilegraphics.cpp
index 25538758c..f7a881bd2 100644
--- a/qt-ui/profilegraphics.cpp
+++ b/qt-ui/profilegraphics.cpp
@@ -1058,16 +1058,20 @@ void ProfileGraphicsView::plot_depth_profile()
QGraphicsSimpleTextItem *ProfileGraphicsView::plot_text(text_render_options_t *tro,const QPointF& pos, const QString& text, QGraphicsItem *parent)
{
- QFontMetrics fm(font());
+ QFont fnt(font());
+ fnt.setBold(true);
+ QFontMetrics fm(fnt);
double dx = tro->hpos * (fm.width(text));
double dy = tro->vpos * (fm.height());
QGraphicsSimpleTextItem *item = new QGraphicsSimpleTextItem(text, parent);
+ item->setFont(fnt);
QPointF point(SCALEGC(pos.x(), pos.y())); // This is neded because of the SCALE macro.
item->setPos(point.x() + dx, point.y() + dy);
item->setBrush(QBrush(profile_color[tro->color].first()));
+ item->setPen(QPen(profile_color[TEXT_BACKGROUND].first()));
item->setFlag(QGraphicsItem::ItemIgnoresTransformations);
if (!parent)