[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/kst/1.5/kst/src/libkstapp
From:       Andrew Walker <arwalker () sumusltd ! com>
Date:       2007-04-30 23:11:32
Message-ID: 1177974692.647070.4321.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 659876 by arwalker:

restore fix for bug 143805

 M  +13 -6     kstviewellipse.cpp  


--- branches/work/kst/1.5/kst/src/libkstapp/kstviewellipse.cpp #659875:659876
@@ -95,15 +95,22 @@
     }
   }
 
-  const int bw(_borderWidth * p.lineWidthAdjustmentFactor());
+  const QRect g(geometry());
+  int bw(_borderWidth * p.lineWidthAdjustmentFactor());
+
+  if (bw > g.width()/2) {
+    bw = g.width()/2;
+  }
+  if (bw > g.height()/2) {
+    bw = g.height()/2;
+  }
   QPen pen(bw > 0 ? _borderColor : _foregroundColor, bw);
   p.setPen(pen);
   if (_transparentFill) {
-    p.setBrush(Qt::NoBrush);  
+    p.setBrush(Qt::NoBrush);
   } else {
     p.setBrush(_foregroundColor);
   }
-  const QRect g(geometry());
   p.drawEllipse(g.x() + bw/2, g.y() + bw/2, g.width() - bw, g.height() - bw);
   p.restore();
 }
@@ -178,10 +185,10 @@
 
 signed int KstViewEllipse::directionFor(const QPoint& pos) {
   signed int direction = KstViewObject::directionFor(pos);
-  if (!(((direction & (UP|DOWN)) == 0) || ((direction & (LEFT|RIGHT)) == 0))) {
-    // not an edge.
+  if (!(((direction & (UP|DOWN)) == 0) || ((direction & (LEFT|RIGHT)) == 0))) {    
+    // not an edge
     direction |= CENTEREDRESIZE;  
-  }  
+  }
   return direction;
 }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic