Do not draw the title "slab" in "outline window title" mode, when the client title is empty (or contains
only space characters). Except when tabbed together with other windows. svn path=/trunk/KDE/kdebase/workspace/; revision=1138015
This commit is contained in:
parent
62b9c59da6
commit
e1669806ef
1 changed files with 17 additions and 12 deletions
|
@ -957,23 +957,28 @@ namespace Oxygen
|
||||||
if( itemCount == 1 )
|
if( itemCount == 1 )
|
||||||
{
|
{
|
||||||
|
|
||||||
if( itemData_.isAnimated() ) {
|
// no title outline if the window caption is empty
|
||||||
|
if( !caption.trimmed().isEmpty() )
|
||||||
|
{
|
||||||
|
if( itemData_.isAnimated() ) {
|
||||||
|
|
||||||
textRect = titleBoundingRect( painter->font(), textRect, caption );
|
textRect = titleBoundingRect( painter->font(), textRect, caption );
|
||||||
renderTitleOutline( painter, item.boundingRect_, palette );
|
renderTitleOutline( painter, item.boundingRect_, palette );
|
||||||
|
|
||||||
} else if( (isActive()||glowIsAnimated()) && configuration().drawTitleOutline() ) {
|
} else if( (isActive()||glowIsAnimated()) && configuration().drawTitleOutline() ) {
|
||||||
|
|
||||||
// adjust textRect
|
// adjust textRect
|
||||||
textRect = titleBoundingRect( painter->font(), textRect, caption );
|
textRect = titleBoundingRect( painter->font(), textRect, caption );
|
||||||
|
|
||||||
// adjusts boundingRect accordingly
|
// adjusts boundingRect accordingly
|
||||||
QRect boundingRect( item.boundingRect_ );
|
QRect boundingRect( item.boundingRect_ );
|
||||||
boundingRect.setLeft( textRect.left() - layoutMetric( LM_TitleBorderLeft ) );
|
boundingRect.setLeft( textRect.left() - layoutMetric( LM_TitleBorderLeft ) );
|
||||||
boundingRect.setRight( textRect.right() + layoutMetric( LM_TitleBorderRight ) );
|
boundingRect.setRight( textRect.right() + layoutMetric( LM_TitleBorderRight ) );
|
||||||
|
|
||||||
// render bounding rect around it with extra margins
|
// render bounding rect around it with extra margins
|
||||||
renderTitleOutline( painter, boundingRect, palette );
|
renderTitleOutline( painter, boundingRect, palette );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue