[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Tue Jun 15 22:28:19 CEST 2004


CVS commit by staikos: 

get rid of a lot of flicker - there's still some in the layout code though.


  M +21 -10    ksttoplevelview.cpp   1.56
  M +2 -2      kstviewwidget.cpp   1.42


--- kdeextragear-2/kst/kst/ksttoplevelview.cpp  #1.55:1.56
@@ -95,6 +95,17 @@ void KstTopLevelView::paint(bool erase) 
   p.setViewXForm(true);
   if (erase) {
+    abort();
+    QBrush brush(_backgroundColor);
+    p.fillRect(geometry(), brush);
+  } else {
+    QRegion r(_w->geometry());
+    for (KstViewObjectList::Iterator i = _children.begin(); i != _children.end(); ++i) {
+      r = r.subtract(QRegion((*i)->geometry()));
+    }
+    p.setClipping(true);
+    p.setClipRegion(r);
     QBrush brush(_backgroundColor);
     p.fillRect(geometry(), brush);
+    p.setClipping(false);
   }
   paint(p);
@@ -268,5 +279,5 @@ bool KstTopLevelView::handlePress(const 
     _moveOffset = QPoint(-1, -1);
     updateFocus(pos);
-    paint(true);
+    paint();
 
     return true;
@@ -536,5 +547,5 @@ void KstTopLevelView::releasePress(const
   _moveOffset = QPoint(-1, -1);
   updateFocus(pos);
-  paint(true);
+  paint();
 }
 
@@ -631,5 +642,5 @@ void KstTopLevelView::makeSameWidth() {
   }
 
-  paint(true);
+  paint();
 }
 
@@ -645,5 +656,5 @@ void KstTopLevelView::makeSameHeight() {
     }
   }
-  paint(true);
+  paint();
 }
 
@@ -659,5 +670,5 @@ void KstTopLevelView::makeSameSize() {
     }
   }
-  paint(true);
+  paint();
 }
 
@@ -684,5 +695,5 @@ void KstTopLevelView::alignLeft() {
     }
   }
-  paint(true);
+  paint();
 }
 
@@ -698,5 +709,5 @@ void KstTopLevelView::alignRight() {
     }
   }
-  paint(true);
+  paint();
 }
 
@@ -712,5 +723,5 @@ void KstTopLevelView::alignTop() {
     }
   }
-  paint(true);
+  paint();
 }
 
@@ -726,5 +737,5 @@ void KstTopLevelView::alignBottom() {
     }
   }
-  paint(true);
+  paint();
 }
 
@@ -758,5 +769,5 @@ void KstTopLevelView::groupSelection() {
     }
 
-    paint(true);
+    paint();
   }
 }

--- kdeextragear-2/kst/kst/kstviewwidget.cpp  #1.41:1.42
@@ -37,5 +37,5 @@ KstViewWidget::KstViewWidget(KstTopLevel
   setMouseTracking(true);
   setFocusPolicy(QWidget::StrongFocus);
-  //setBackgroundMode(Qt::NoBackground);
+  setBackgroundMode(Qt::NoBackground);
 }
 
@@ -90,5 +90,5 @@ void KstViewWidget::leaveEvent(QEvent *e
           // First cancel any operations
           _view->cancelMouseOperations();
-          _view->paint(true);
+          _view->paint();
           d->drag();
         }





More information about the Kst mailing list