[Kst] [Bug 118676] Rectangle object can be made to vanish

George Staikos staikos at kde.org
Tue Dec 20 03:04:07 CET 2005


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=118676         
staikos kde org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From staikos kde org  2005-12-20 03:04 -------
SVN commit 489892 by staikos:

Boxes are always movable in their geometry rect.  Seems to make sense I think,
but up for comment.  For now it fixes the usability issue.
BUG: 118676


 M  +2 -1      kstviewbox.cpp  
 M  +11 -1     kstviewobject.cpp  
 M  +2 -0      kstviewobject.h  


--- trunk/extragear/graphics/kst/kst/kstviewbox.cpp #489891:489892
 @ -34,6 +34,7  @
   _xRound = 0;
   _yRound = 0;
   _cornerStyle = Qt::MiterJoin;
+  _fallThroughTransparency = false;
   setTransparent(true);
   _transparentFill = false;
   setFollowsFlow(true);
 @ -57,9 +58,9  @
   // these always have these values
   _type = "Box";
   _layoutActions |= Delete | Raise | Lower | RaiseToTop | LowerToBottom | Rename | MoveTo | Copy | CopyTo;
+  _fallThroughTransparency = false;
   setTransparent(true);
   setFollowsFlow(true);
-
 }
 
 
--- trunk/extragear/graphics/kst/kst/kstviewobject.cpp #489891:489892
 @ -71,6 +71,7  @
   _transparent = false;
   _followsFlow = false;
   _dialogLock = false;
+  _fallThroughTransparency = true;
   setMinimumSize(DEFAULT_MINIMUM_SIZE);
 }
 
 @ -85,6 +86,7  @
   _transparent = false;
   _followsFlow = false;
   _dialogLock = false;
+  _fallThroughTransparency = true;
   setMinimumSize(DEFAULT_MINIMUM_SIZE);
   load(e);
 }
 @ -105,6 +107,7  @
   _container = true;
   _dialogLock = false;
   _selected = false;
+  _fallThroughTransparency = true;
   _geom = viewObject._geom;
   _transparent = viewObject._transparent;
   _followsFlow = viewObject._followsFlow;
 @ -836,8 +839,10  @
       }
       if (!obj) {
         if ((*i)->transparent()) {
-          if ((*i)->clipRegion().contains(pos)) {
+          if (!(*i)->fallThroughTransparency() && (*i)->geometry().contains(pos)) {
             obj = *i;
+          } else if ((*i)->clipRegion().contains(pos)) {
+            obj = *i;
           } else if (borderForTransparent && (*i)->geometry().contains(pos)) {
             const QRect g((*i)->geometry());
             if ((pos.x() >= g.left() && pos.x() <= g.left() + KST_RESIZE_BORDER_W) ||
 @ -1740,5 +1745,10  @
   return _dialogLock;
 }
 
+
+bool KstViewObject::fallThroughTransparency() const {
+  return _fallThroughTransparency;
+}
+
 #include "kstviewobject.moc"
 // vim: ts=2 sw=2 et
--- trunk/extragear/graphics/kst/kst/kstviewobject.h #489891:489892
 @ -111,6 +111,7  @
     KstViewObjectList& children();
 
     bool objectDirty() const; // true if this object or a child is dirty
+    bool fallThroughTransparency() const;
 
     virtual QWidget *configWidget();
 
 @ -291,6 +292,7  @
     bool _followsFlow : 1;
     bool _dialogLock : 1;
     bool _container : 1;
+    bool _fallThroughTransparency : 1;
     int _columns : 6; // "64 columns ought to be enough for anyone"
     QGuardedPtr<KstViewObject> _topObjectForMenu;
     QGuardedPtr<KstViewObject> _parent; // danger!!


More information about the Kst mailing list