Make the shadows work just a little better on dark text
svn path=/trunk/kdebase/kwin/; revision=381060
This commit is contained in:
parent
496aff5905
commit
371b40edbd
2 changed files with 11 additions and 3 deletions
|
@ -1300,8 +1300,11 @@ void KeramikClient::updateCaptionBuffer()
|
|||
if ( clientHandler->useShadowedText() )
|
||||
{
|
||||
p.translate( QApplication::reverseLayout() ? -1 : 1, 1 );
|
||||
p.setPen( options()->color(ColorTitleBar, active).dark() );
|
||||
p.setPen( black );
|
||||
//p.setPen( options()->color(ColorTitleBar, active).dark() );
|
||||
if (qGray(options()->color(ColorFont, active).rgb()) < 100)
|
||||
p.setPen( QColor(200,200,200) );
|
||||
else
|
||||
p.setPen( black );
|
||||
p.drawText( tr, flags, caption() );
|
||||
p.translate( QApplication::reverseLayout() ? 1 : -1, -1 );
|
||||
}
|
||||
|
|
|
@ -996,7 +996,12 @@ void PlastikClient::update_captionBuffer()
|
|||
painter.drawTiledPixmap(aCaptionBuffer->rect(), *aTitleBarTile);
|
||||
if(PlastikHandler::titleShadow())
|
||||
{
|
||||
shadow = se.makeShadow(textPixmap, QColor(0, 0, 0));
|
||||
QColor shadowColor;
|
||||
if (qGray(PlastikHandler::getColor(TitleFont,true).rgb()) < 100)
|
||||
shadowColor = QColor(255, 255, 255);
|
||||
else
|
||||
shadowColor = QColor(0,0,0);
|
||||
shadow = se.makeShadow(textPixmap, shadowColor);
|
||||
painter.drawImage(1, 1, shadow);
|
||||
}
|
||||
painter.setFont(s_titleFont);
|
||||
|
|
Loading…
Reference in a new issue