mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Revert "Profile: add white outline to all text"
This reverts commit 44c33742c2
.
I mistakenly applied the wrong version of the patch.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
6b08a6d428
commit
9d9d516c26
1 changed files with 1 additions and 5 deletions
|
@ -1063,20 +1063,16 @@ void ProfileGraphicsView::plot_depth_profile()
|
||||||
|
|
||||||
QGraphicsSimpleTextItem *ProfileGraphicsView::plot_text(text_render_options_t *tro,const QPointF& pos, const QString& text, QGraphicsItem *parent)
|
QGraphicsSimpleTextItem *ProfileGraphicsView::plot_text(text_render_options_t *tro,const QPointF& pos, const QString& text, QGraphicsItem *parent)
|
||||||
{
|
{
|
||||||
QFont fnt(font());
|
QFontMetrics fm(font());
|
||||||
fnt.setBold(true);
|
|
||||||
QFontMetrics fm(fnt);
|
|
||||||
|
|
||||||
double dx = tro->hpos * (fm.width(text));
|
double dx = tro->hpos * (fm.width(text));
|
||||||
double dy = tro->vpos * (fm.height());
|
double dy = tro->vpos * (fm.height());
|
||||||
|
|
||||||
QGraphicsSimpleTextItem *item = new QGraphicsSimpleTextItem(text, parent);
|
QGraphicsSimpleTextItem *item = new QGraphicsSimpleTextItem(text, parent);
|
||||||
item->setFont(fnt);
|
|
||||||
QPointF point(SCALEGC(pos.x(), pos.y())); // This is neded because of the SCALE macro.
|
QPointF point(SCALEGC(pos.x(), pos.y())); // This is neded because of the SCALE macro.
|
||||||
|
|
||||||
item->setPos(point.x() + dx, point.y() + dy);
|
item->setPos(point.x() + dx, point.y() + dy);
|
||||||
item->setBrush(QBrush(profile_color[tro->color].first()));
|
item->setBrush(QBrush(profile_color[tro->color].first()));
|
||||||
item->setPen(QPen(profile_color[TEXT_BACKGROUND].first()));
|
|
||||||
item->setFlag(QGraphicsItem::ItemIgnoresTransformations);
|
item->setFlag(QGraphicsItem::ItemIgnoresTransformations);
|
||||||
|
|
||||||
if (!parent)
|
if (!parent)
|
||||||
|
|
Loading…
Add table
Reference in a new issue