Mailinglist Archive: yast-commit (819 mails)

< Previous Next >
[yast-commit] r54972 - /trunk/qt-graph/src/QGraph.cc
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Sat, 24 Jan 2009 21:43:19 -0000
  • Message-id: <E1LQqHg-0007LW-1H@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Sat Jan 24 22:43:19 2009
New Revision: 54972

URL: http://svn.opensuse.org/viewcvs/yast?rev=54972&view=rev
Log:
- some render fine-tuning

Modified:
trunk/qt-graph/src/QGraph.cc

Modified: trunk/qt-graph/src/QGraph.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt-graph/src/QGraph.cc?rev=54972&r1=54971&r2=54972&view=diff
==============================================================================
--- trunk/qt-graph/src/QGraph.cc (original)
+++ trunk/qt-graph/src/QGraph.cc Sat Jan 24 22:43:19 2009
@@ -161,7 +161,7 @@
QGraph::drawArrow(const QLineF& line, const QColor& color, QPainter* painter)
const
{
QLineF n(line.normalVector());
- QPointF o(n.dx() / 2.0, n.dy() / 2.0);
+ QPointF o(n.dx() / 3.0, n.dy() / 3.0);

QPolygonF polygon;
polygon.append(line.p1() + o);
@@ -273,7 +273,7 @@
QFontMetrics fm(painter->fontMetrics());
QRectF rect(fm.boundingRect(text));
rect.moveCenter(gToQ(textlabel->p, false));
- painter->drawText(rect, Qt::AlignCenter | Qt::AlignHCenter, text);
+ painter->drawText(rect.adjusted(-1, -1, +1, +1), Qt::AlignCenter |
Qt::AlignHCenter, text);
}


@@ -287,8 +287,7 @@

// don't use gToQ here since it adjusts the values
QRectF rect(GD_bb(graph).LL.x, GD_bb(graph).LL.y, GD_bb(graph).UR.x,
GD_bb(graph).UR.y);
- const qreal border = 20.0;
- scene->setSceneRect(rect.adjusted(-border, -border, border, border));
+ scene->setSceneRect(rect.adjusted(-5, -5, 5, 5));

size = rect.size();


--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages