replaced deprecated functions
svn path=/trunk/KDE/kdebase/workspace/; revision=535878
This commit is contained in:
parent
abeff9d0f6
commit
a7f42a7a21
4 changed files with 12 additions and 12 deletions
|
@ -323,11 +323,11 @@ void LaptopButton::drawButton(QPainter *p)
|
|||
g.setCurrentColorGroup( QPalette::Active );
|
||||
int w = width();
|
||||
int h = height();
|
||||
p->fillRect(1, 1, w-2, h-2, isDown() ? g.mid() : g.button());
|
||||
p->setPen(isDown() ? g.dark() : g.light());
|
||||
p->fillRect(1, 1, w-2, h-2, isDown() ? g.color(QPalette::Mid) : g.color(QPalette::Button) );
|
||||
p->setPen(isDown() ? g.color( QPalette::Dark ) : g.color( QPalette::Light ));
|
||||
p->drawLine(0, 0, w-1, 0);
|
||||
p->drawLine(0, 0, 0, w-1);
|
||||
p->setPen(isDown() ? g.light() : g.dark());
|
||||
p->setPen(isDown() ? g.color( QPalette::Light ) : g.color( QPalette::Dark ));
|
||||
p->drawLine(w-1, 0, w-1, h-1);
|
||||
p->drawLine(0, h-1, w-1, h-1);
|
||||
}
|
||||
|
@ -493,7 +493,7 @@ void LaptopClient::paintEvent( QPaintEvent* )
|
|||
p.drawLine(r.left()+1, r.bottom()-2, r.right()-1, r.bottom()-2);
|
||||
|
||||
// outer frame
|
||||
p.setPen(g.light());
|
||||
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());
|
||||
|
@ -566,7 +566,7 @@ void LaptopClient::paintEvent( QPaintEvent* )
|
|||
p.setPen(g.mid());
|
||||
p.drawLine(r.x(), r.y(), r.right(), r.y());
|
||||
p.drawLine(r.x(), r.y(), r.x(), r.bottom());
|
||||
p.setPen(g.button());
|
||||
p.setPen(g.color(QPalette::Button));
|
||||
p.drawLine(r.right(), r.y(), r.right(), r.bottom());
|
||||
p.drawLine(r.x(), r.bottom(), r.right(), r.bottom());
|
||||
p.setPen(options()->color(KDecoration::ColorFont, false));
|
||||
|
@ -650,7 +650,7 @@ void LaptopClient::updateActiveBuffer( )
|
|||
p.setPen(g.mid());
|
||||
p.drawLine(r.x(), r.y(), r.right(), r.y());
|
||||
p.drawLine(r.x(), r.y(), r.x(), r.bottom());
|
||||
p.setPen(g.button());
|
||||
p.setPen(g.color(QPalette::Button));
|
||||
p.drawLine(r.right(), r.y(), r.right(), r.bottom());
|
||||
p.drawLine(r.x(), r.bottom(), r.right(), r.bottom());
|
||||
p.setPen(options()->color(KDecoration::ColorFont, true));
|
||||
|
|
|
@ -513,7 +513,7 @@ void RedmondDeco::paintEvent( QPaintEvent* )
|
|||
p.drawRect( x+i, y+i, w-2*i, h-2*i );
|
||||
|
||||
// Draw highlights and lowlights
|
||||
p.setPen(g.light());
|
||||
p.setPen(g.color( QPalette::Light ));
|
||||
for (int i = 1; i <= borderWidth/3; i++) {
|
||||
p.drawLine( x+i, y+i, x2-i-1, y+i);
|
||||
p.drawLine( x+i, y+i, x+i, y2-i-1);
|
||||
|
|
|
@ -158,9 +158,9 @@ WebButton::drawButton(QPainter *p)
|
|||
else
|
||||
{
|
||||
if (mouseOver_)
|
||||
highlightPen = QPen( palette().highlight());
|
||||
highlightPen = QPen( palette().color( QPalette::Highlight ));
|
||||
else
|
||||
highlightPen = QPen(Qt::NoPen);
|
||||
highlightPen = QPen(Qt::NoPen);
|
||||
}
|
||||
|
||||
p->fillRect(rect(), palette().color( QPalette::Background ) );
|
||||
|
|
|
@ -647,9 +647,9 @@ void ButtonSourceItem::paintCell(QPainter *p, const QPalette &cg, int column, in
|
|||
// we need the color group cg, so to the work here, not in setButton...
|
||||
if (m_dirty) {
|
||||
if (m_button.supported) {
|
||||
setPixmap(0, bitmapPixmap(m_button.icon, cg.foreground() ) );
|
||||
setPixmap(0, bitmapPixmap(m_button.icon, cg.color( QPalette::Foreground ) ) );
|
||||
} else {
|
||||
setPixmap(0, bitmapPixmap(m_button.icon, cg.mid() ) );
|
||||
setPixmap(0, bitmapPixmap(m_button.icon, cg.color( QPalette::Mid ) ) );
|
||||
}
|
||||
m_dirty = false;
|
||||
}
|
||||
|
@ -659,7 +659,7 @@ void ButtonSourceItem::paintCell(QPainter *p, const QPalette &cg, int column, in
|
|||
} else {
|
||||
// grey out unsupported buttons
|
||||
QPalette cg2 = cg;
|
||||
cg2.setColor(QPalette::Text, cg.mid() );
|
||||
cg2.setColor(QPalette::Text, cg.color(QPalette::Mid) );
|
||||
Q3ListViewItem::paintCell(p,cg2,column,width,align);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue