diff --git a/include/TEWidget.h b/include/TEWidget.h index da9f09b6..dcb55f6a 100644 --- a/include/TEWidget.h +++ b/include/TEWidget.h @@ -74,7 +74,7 @@ protected: bool eventFilter( QObject *, QEvent * ); void drawAttrStr(QPainter &paint, QRect rect, - char* str, int len, ca attr, BOOL pm); + char* str, int len, ca attr, BOOL pm, BOOL clear); void paintEvent( QPaintEvent * ); void resizeEvent(QResizeEvent*); diff --git a/src/TEWidget.C b/src/TEWidget.C index f7130484..8a49d8b4 100644 --- a/src/TEWidget.C +++ b/src/TEWidget.C @@ -189,12 +189,12 @@ TEWidget::TEWidget(QWidget *parent, const char *name) : QFrame(parent,name) */ void TEWidget::drawAttrStr(QPainter &paint, QRect rect, - char* str, int len, ca attr, BOOL pm) + char* str, int len, ca attr, BOOL pm, BOOL clear) { if (pm && color_table[attr.b].transparent) { paint.setBackgroundMode( TransparentMode ); - erase(rect); + if (clear) erase(rect); } else { @@ -278,7 +278,7 @@ HCNT("setImage"); } drawAttrStr(paint, QRect(blX+tLx+font_w*x,bY+tLy+font_h*y,font_w*len,font_h), - disstr, len, ext[x], pm != NULL); + disstr, len, ext[x], pm != NULL, true); x += len - 1; } } @@ -331,11 +331,12 @@ HCNT("paintEvent"); int rlx = QMIN(columns-1, QMAX(0,(rect.right() - tLx - blX ) / font_w)); int rly = QMIN(lines-1, QMAX(0,(rect.bottom() - tLy - bY ) / font_h)); -/* + /* printf("paintEvent: %d..%d, %d..%d (%d..%d, %d..%d)\n",lux,rlx,luy,rly, rect.left(), rect.right(), rect.top(), rect.bottom()); -*/ - + */ + if (pm != NULL && color_table[image->b].transparent) + erase(rect); for (int y = luy; y <= rly; y++) for (int x = lux; x <= rlx; x++) { char *disstr = new char[columns]; int len = 1; @@ -352,7 +353,7 @@ HCNT("paintEvent"); } drawAttrStr(paint, QRect(blX+tLx+font_w*x,bY+tLy+font_h*y,font_w*len,font_h), - disstr, len, image[loc(x,y)], pm != NULL); + disstr, len, image[loc(x,y)], pm != NULL, false); x += len - 1; delete disstr; } diff --git a/src/rootBg.C b/src/rootBg.C index 5f8d41c6..a88cf628 100644 --- a/src/rootBg.C +++ b/src/rootBg.C @@ -248,13 +248,13 @@ void RootPixmap::generateBackground(bool shade, double r, double g, double b) if ( orMode == Portrait ) { pmDesktop.resize( 20, QApplication::desktop()->height() ); - KPixmapEffect::gradient(pmDesktop, color2, color1, + KPixmapEffect::gradient(pmDesktop, color1, color2, KPixmapEffect::VerticalGradient, numColors ); } else { pmDesktop.resize( QApplication::desktop()->width(), 20 ); - KPixmapEffect::gradient(pmDesktop, color2, color1, + KPixmapEffect::gradient(pmDesktop, color1, color2, KPixmapEffect::HorizontalGradient, numColors); @@ -265,13 +265,13 @@ void RootPixmap::generateBackground(bool shade, double r, double g, double b) bgPixmap = new QPixmap(w,h); if ( orMode == Portrait ) { - for (uint pw = 0; pw <= w; pw += pmDesktop.width()) - bitBlt( bgPixmap, pw, 0, &pmDesktop, 0, 0, + for (uint pw = 0; pw <= w/20; pw += pmDesktop.width()) + bitBlt( bgPixmap, pw*20, 0, &pmDesktop, 0, 0, pmDesktop.width(), h); } else { - for (uint ph = 0; ph <= h; ph += pmDesktop.height()) { + for (uint ph = 0; ph <= h/20; ph += pmDesktop.height()) { debug("land %d",ph); - bitBlt( bgPixmap, 0, ph, &pmDesktop, 0, 0, + bitBlt( bgPixmap, 0, ph*20, &pmDesktop, 0, 0, w, pmDesktop.height()); } }