deprecated--

svn path=/trunk/KDE/kdebase/workspace/; revision=542406
This commit is contained in:
Thorsten Roeder 2006-05-19 09:37:34 +00:00
parent c20c64c504
commit a9612d82d4
2 changed files with 21 additions and 21 deletions

View file

@ -198,7 +198,7 @@ static void create_pixmaps()
btnDownPix2->fill(c.rgb());
g = options()->palette(KDecoration::ColorButtonBg, false);
g.setCurrentColorGroup( QPalette::Active );
c = g.background();
c = g.background().color();
iBtnPix1->fill(c.rgb());
iBtnDownPix1->fill(c.rgb());
iBtnPix2->fill(c.rgb());
@ -206,14 +206,14 @@ static void create_pixmaps()
}
g = options()->palette(KDecoration::ColorButtonBg, true);
g.setCurrentColorGroup( QPalette::Active );
c = g.background();
c = g.background().color();
drawButtonFrame(btnPix1, g, false);
drawButtonFrame(btnDownPix1, g, true);
drawButtonFrame(btnPix2, g, false);
drawButtonFrame(btnDownPix2, g, true);
g = options()->palette(KDecoration::ColorButtonBg, false);
g.setCurrentColorGroup( QPalette::Active );
c = g.background();
c = g.background().color();
drawButtonFrame(iBtnPix1, g, false);
drawButtonFrame(iBtnDownPix1, g, true);
drawButtonFrame(iBtnPix2, g, false);
@ -483,7 +483,7 @@ void LaptopClient::paintEvent( QPaintEvent* )
p.drawRect(r);
// fill mid frame...
p.setPen(g.background() );
p.setPen(g.background().color());
p.drawLine(r.x()+2, r.y()+2, r.right()-2, r.y()+2);
p.drawLine(r.left()+2, r.y()+3, r.left()+2, r.bottom()-layoutMetric(LM_BorderBottom)+1 );
p.drawLine(r.right()-2, r.y()+3, r.right()-2, r.bottom()-layoutMetric(LM_BorderBottom)+1 );
@ -496,7 +496,7 @@ void LaptopClient::paintEvent( QPaintEvent* )
p.setPen(g.color(QPalette::Light));
p.drawLine(r.x()+1, r.y()+1, r.right()-1, r.y()+1);
p.drawLine(r.x()+1, r.y()+1, r.x()+1, r.bottom()-1);
p.setPen(g.dark());
p.setPen(g.dark().color());
p.drawLine(r.right()-1, r.y()+1, r.right()-1, r.bottom()-1);
p.drawLine(r.x()+1, r.bottom()-1, r.right()-1, r.bottom()-1);
@ -538,7 +538,7 @@ void LaptopClient::paintEvent( QPaintEvent* )
if(isActive()){
updateActiveBuffer();
p.drawPixmap(r.x(), r.y(), activeBuffer);
p.setPen(g.background());
p.setPen(g.background().color());
p.drawPoint(r.x(), r.y());
p.drawPoint(r.right(), r.y());
p.drawLine(r.right()+1, r.y(), r.right()+1, r.bottom());
@ -563,7 +563,7 @@ void LaptopClient::paintEvent( QPaintEvent* )
p.fillRect(r.x()+((r.width()-fm.width(caption()))/2)-4, r.y(),
fm.width(caption())+8, r.height()-1,
g.brush(QPalette::Background));
p.setPen(g.mid());
p.setPen(g.mid().color());
p.drawLine(r.x(), r.y(), r.right(), r.y());
p.drawLine(r.x(), r.y(), r.x(), r.bottom());
p.setPen(g.color(QPalette::Button));
@ -574,7 +574,7 @@ void LaptopClient::paintEvent( QPaintEvent* )
Qt::AlignCenter, caption() );
g = options()->palette(KDecoration::ColorFrame, true);
g.setCurrentColorGroup( QPalette::Active );
p.setPen(g.background());
p.setPen(g.background().color());
p.drawPoint(r.x(), r.y());
p.drawPoint(r.right(), r.y());
p.drawLine(r.right()+1, r.y(), r.right()+1, r.bottom());
@ -647,7 +647,7 @@ void LaptopClient::updateActiveBuffer( )
p.fillRect(r.x()+((r.width()-fm.width(caption()))/2)-4, 0,
fm.width(caption())+8, r.height(),
g.brush(QPalette::Background));
p.setPen(g.mid());
p.setPen(g.mid().color());
p.drawLine(r.x(), r.y(), r.right(), r.y());
p.drawLine(r.x(), r.y(), r.x(), r.bottom());
p.setPen(g.color(QPalette::Button));
@ -658,7 +658,7 @@ void LaptopClient::updateActiveBuffer( )
Qt::AlignCenter, caption() );
g = options()->palette(KDecoration::ColorFrame, true);
g.setCurrentColorGroup( QPalette::Active );
p.setPen(g.background());
p.setPen(g.background().color());
p.drawPoint(r.x(), r.y());
p.drawPoint(r.right(), r.y());
p.drawLine(r.right()+1, r.y(), r.right()+1, r.bottom());

View file

@ -104,12 +104,12 @@ static inline const KDecorationOptions* options()
static void make_button_fx(const QPalette &g, QPixmap *pix, bool light=false)
{
pix->fill(g.background());
pix->fill(g.background().color());
QPainter p(pix);
if(QPixmap::defaultDepth() > 8){
int i, destH, destS, destV, srcH, srcS, srcV;
QColor btnColor = g.background();
QColor btnColor = g.background().color();
if(btnSource->depth() < 32)
*btnSource = btnSource->convertDepth(32);
@ -137,12 +137,12 @@ static void make_button_fx(const QPalette &g, QPixmap *pix, bool light=false)
lcDark3->setMask(*lcDark3);
lcLight1->setMask(*lcLight1);
}
p.setPen(g.dark());
p.setPen(g.dark().color());
p.drawPixmap(0, 0, *lcDark2);
p.drawPixmap(0, 0, *lcDark1);
p.setPen(g.mid());
p.setPen(g.mid().color());
p.drawPixmap(0, 0, *lcDark3);
p.setPen(g.light());
p.setPen(g.light().color());
p.drawPixmap(0, 0, *lcLight1);
}
}
@ -618,19 +618,19 @@ void ModernSys::paintEvent( QPaintEvent* )
}
// titlebar highlight
p.setPen(g.light());
p.setPen(g.light().color());
p.drawLine(1, 1, 1, title_height+3);
p.drawLine(1, 1, w-3, 1);
p.setPen(g.dark());
p.setPen(g.dark().color());
p.drawLine(w-2, 1, w-2, title_height+3);
p.drawLine(0, title_height+2, w-2, title_height+2);
// frame
g = options()->palette(ColorFrame, isActive());
g.setCurrentColorGroup(QPalette::Active);
p.setPen(g.light());
p.setPen(g.light().color());
p.drawLine(1, title_height+3, 1, h-2);
p.setPen(g.dark());
p.setPen(g.dark().color());
p.drawLine(2, h-2, w-2, h-2);
p.drawLine(w-2, title_height+3, w-2, h-2);
//p.drawPoint(w-3, title_height+3);
@ -639,11 +639,11 @@ void ModernSys::paintEvent( QPaintEvent* )
qDrawShadePanel(&p, border_width-1, title_height+3, w-2*border_width+2, h-title_height-border_width-2, g, true);
if (show_handle) {
p.setPen(g.dark());
p.setPen(g.dark().color());
p.drawLine(width()-3, height()-hs-1, width()-3, height()-3);
p.drawLine(width()-hs-1, height()-3, width()-3, height()-3);
p.setPen(g.light());
p.setPen(g.light().color());
p.drawLine(width()-hw, height()-hs-1, width()-hw, height()-hw);
p.drawLine(width()-hs-1, height()-hw, width()-hw, height()-hw);
p.drawLine(width()-hw, height()-hs-1, width()-4, height()-hs-1);