Don't use a bottom gradient, just a top one. There isn't enough space on the

bottom to get a smooth gradient that is noticeable and it doesn't blend
properly.

svn path=/trunk/kdebase/kwin/; revision=39070
This commit is contained in:
Daniel M. Duley 2000-01-23 15:13:59 +00:00
parent 202be83dae
commit cdbf1668b5

View file

@ -45,9 +45,7 @@ static unsigned char question_bits[] = {
static QPixmap *titlePix=0; static QPixmap *titlePix=0;
static KPixmap *aUpperGradient=0; static KPixmap *aUpperGradient=0;
static KPixmap *aLowerGradient=0;
static KPixmap *iUpperGradient=0; static KPixmap *iUpperGradient=0;
static KPixmap *iLowerGradient=0;
static bool pixmaps_created = false; static bool pixmaps_created = false;
static void create_pixmaps() static void create_pixmaps()
@ -85,11 +83,6 @@ static void create_pixmaps()
aUpperGradient->resize(32, 18); aUpperGradient->resize(32, 18);
iUpperGradient = new KPixmap; iUpperGradient = new KPixmap;
iUpperGradient->resize(32, 18); iUpperGradient->resize(32, 18);
aLowerGradient = new KPixmap;
aLowerGradient->resize(32, 6);
iLowerGradient = new KPixmap;
iLowerGradient->resize(32, 6);
QColor bgColor = kapp->palette().normal().background(); QColor bgColor = kapp->palette().normal().background();
KPixmapEffect::gradient(*aUpperGradient, KPixmapEffect::gradient(*aUpperGradient,
options->color(Options::Frame, true).light(130), options->color(Options::Frame, true).light(130),
@ -99,12 +92,6 @@ static void create_pixmaps()
options->color(Options::Frame, false).light(130), options->color(Options::Frame, false).light(130),
bgColor, bgColor,
KPixmapEffect::VerticalGradient); KPixmapEffect::VerticalGradient);
KPixmapEffect::gradient(*aLowerGradient, bgColor,
options->color(Options::Frame, true).dark(120),
KPixmapEffect::VerticalGradient);
KPixmapEffect::gradient(*iLowerGradient, bgColor,
options->color(Options::Frame, false).dark(120),
KPixmapEffect::VerticalGradient);
} }
} }
@ -320,11 +307,9 @@ void SystemClient::paintEvent( QPaintEvent* )
if(aUpperGradient){ if(aUpperGradient){
if(isActive()){ if(isActive()){
p.drawTiledPixmap(0, 0, width(), 18, *aUpperGradient); p.drawTiledPixmap(0, 0, width(), 18, *aUpperGradient);
p.drawTiledPixmap(0, height()-7, width(), 6, *aLowerGradient);
} }
else{ else{
p.drawTiledPixmap(0, 0, width(), 18, *iUpperGradient); p.drawTiledPixmap(0, 0, width(), 18, *iUpperGradient);
p.drawTiledPixmap(0, height()-7, width(), 6, *iLowerGradient);
} }
} }
t.setTop( 2 ); t.setTop( 2 );