[Kst] kdeextragear-2/kst/kst

Andrew Walker arwalker at sumusltd.com
Fri Apr 9 22:54:44 CEST 2004


CVS commit by arwalker: 

A few UI issues


  M +22 -6     kstlogtable.cpp   1.4
  M +3 -3      kstlogtable.h   1.3


--- kdeextragear-2/kst/kst/kstlogtable.cpp  #1.3:1.4
@@ -47,4 +47,6 @@ void KstLogTable::hideRows( KstDebug::Lo
     iNumRows = pMessages->count();
         
+    setUpdatesEnabled( FALSE );
+    
     for( i=iStart; i<iNumRows; i++ ) {
       if( (*pMessages)[i].level == level ) {
@@ -56,4 +58,6 @@ void KstLogTable::hideRows( KstDebug::Lo
       }
     }
+    
+    setUpdatesEnabled( TRUE );  
   }
 }
@@ -83,4 +87,5 @@ void KstLogTable::paintCell( QPainter* p
   int             iMargin;
   int     iHeight;
+  int                   iStep;
   
   if (selected) {
@@ -100,4 +105,8 @@ void KstLogTable::paintCell( QPainter* p
     }
     iHeight = cr.height() - ( 2 * iMargin );
+    iStep   = iHeight / 4;
+    if( iStep == 0 ) {
+      iStep = 1;
+    }
     if( col == 0 ) {
       switch( (*(_debug->messages()))[row].level ) {
@@ -116,9 +125,16 @@ void KstLogTable::paintCell( QPainter* p
         break;
       case KstDebug::Error:
-        color.setNamedColor( I18N_NOOP("VioletRed") );
+        color.setNamedColor( I18N_NOOP("Red") );
         painter->setBrush( color );
-        painter->drawRoundRect( iMargin, iMargin, 
-                                iHeight, iHeight, 
-                                iHeight / 3, iHeight / 3 );
+        pointArray.putPoints( 0, 8, 
+                              iMargin + ( 0 * iStep ), iMargin + ( 1 * iStep ), 
+                              iMargin + ( 0 * iStep ), iMargin + ( 3 * iStep ), 
+                              iMargin + ( 1 * iStep ), iMargin + ( 4 * iStep ), 
+                              iMargin + ( 3 * iStep ), iMargin + ( 4 * iStep ), 
+                              iMargin + ( 4 * iStep ), iMargin + ( 3 * iStep ), 
+                              iMargin + ( 4 * iStep ), iMargin + ( 1 * iStep ), 
+                              iMargin + ( 3 * iStep ), iMargin + ( 0 * iStep ), 
+                              iMargin + ( 1 * iStep ), iMargin + ( 0 * iStep ) ); 
+        painter->drawPolygon( pointArray );
         break;
       case KstDebug::Debug:





More information about the Kst mailing list