[kgraphviewer-devel] [kgraphviewer/libkgraphviz] src/kgraphviz: Draw zoom rect of panner view filled.
Kevin Funk
krf at electrostorm.net
Thu Feb 10 18:22:31 CET 2011
Git commit 63373890a67feb3256f08ecf6bb5f2d4b0bf394b by Kevin Funk.
Committed on 07/02/2011 at 17:45.
Pushed by kfunk into branch 'libkgraphviz'.
Draw zoom rect of panner view filled.
Set the opacity of the brush to 0.2, looks fine.
M +3 -0 src/kgraphviz/pannerview.cpp
http://commits.kde.org/kgraphviewer/63373890a67feb3256f08ecf6bb5f2d4b0bf394b
diff --git a/src/kgraphviz/pannerview.cpp b/src/kgraphviz/pannerview.cpp
index d586c62..7437fcc 100644
--- a/src/kgraphviz/pannerview.cpp
+++ b/src/kgraphviz/pannerview.cpp
@@ -174,6 +174,9 @@ void PannerView::drawForeground(QPainter * p, const QRectF & rect )
if (d->m_zoomRect.width() > 10 && d->m_zoomRect.height() > 10)
{
p->setPen(Qt::red);
+ p->setOpacity(0.2);
+ p->setBrush(Qt::red);
+
// substract pen width, i.e. draw inside
qreal penWidth = p->pen().widthF();
p->drawRect(d->m_zoomRect.adjusted(-penWidth, -penWidth, -penWidth, -penWidth));
More information about the kgraphviewer-devel
mailing list