[Kst] extragear/graphics/kst/kst

Rick Chern rchern at interchange.ubc.ca
Fri Aug 5 21:59:01 CEST 2005


SVN commit 443329 by rchern:

fix hotpoint colour

 M  +5 -6      kstviewarrow.cpp  
 M  +1 -2      kstviewline.cpp  


--- trunk/extragear/graphics/kst/kst/kstviewarrow.cpp #443328:443329
@@ -37,7 +37,6 @@
 
 
 void KstViewArrow::paint(KstPaintType type, QPainter& p) {
-  KstViewLine::paint(type, p);
   if (hasArrow()) {
     int w = width();
     QPen pen(_foregroundColor, w);
@@ -59,7 +58,7 @@
       }
       double sina = sin(theta + M_PI / 2);
       double cosa = cos(theta + M_PI / 2);
-      int l = _toArrowScaling * 2 * w;
+      int l = (int)(_toArrowScaling * 2.0 * w);
       pts[0] = to;
       pts[1] = QPoint(to.x() + l, to.y() + int(sqrt(3) * l));
       pts[2] = QPoint(to.x() - l, to.y() + int(sqrt(3) * l));
@@ -83,7 +82,7 @@
       }
       double sina = sin(theta + M_PI / 2);
       double cosa = cos(theta + M_PI / 2);
-      int l = _fromArrowScaling * 2 * w;
+      int l = (int)(_fromArrowScaling * 2.0 * w);
       pts[0] = to;
       pts[1] = QPoint(to.x() + l, to.y() + int(sqrt(3) * l));
       pts[2] = QPoint(to.x() - l, to.y() + int(sqrt(3) * l));
@@ -94,7 +93,7 @@
       p.drawPolygon(pts);
     }
   }
-  
+  KstViewLine::paint(type, p);
 }
 
 
@@ -117,8 +116,8 @@
   QMap<QString, QPair<QString, QString> > map = KstViewLine::dialogData();
   map.insert(QString("HasFromArrow"), qMakePair(QString("Arrow at start"), QString("QCheckBox")));
   map.insert(QString("HasToArrow"), qMakePair(QString("Arrow at end"), QString("QCheckBox")));
-  map.insert(QString("FromArrowScaling"), qMakePair(QString("Start arrow scaling"), QString("QSpinBox")));
-  map.insert(QString("ToArrowScaling"), qMakePair(QString("End arrow scaling"), QString("QSpinBox")));
+  map.insert(QString("FromArrowScaling"), qMakePair(QString("Start arrow scaling"), QString("KDoubleNumInput")));
+  map.insert(QString("ToArrowScaling"), qMakePair(QString("End arrow scaling"), QString("KDoubleNumInput")));
   return map;
 }
 
--- trunk/extragear/graphics/kst/kst/kstviewline.cpp #443328:443329
@@ -210,10 +210,9 @@
   rect.setSize(QSize(5,5));
   rect.moveTopLeft(point1);
   p.setPen(QPen(Qt::black, 0));
-  p.fillRect(rect, Qt::green);
+  p.setBrush(QBrush(Qt::green, Qt::SolidPattern));
   p.drawRect(rect);
   rect.moveTopLeft(point2);
-  p.fillRect(rect, Qt::green);
   p.drawRect(rect);
 }
 


More information about the Kst mailing list