Do not show the desktop name when using a tabbox mode which only includes windows from current desktop. In that case the information is redundant as all windows are on the same desktop.
svn path=/trunk/KDE/kdebase/workspace/; revision=1104681
This commit is contained in:
parent
9a86e83d6e
commit
551bcc2959
1 changed files with 8 additions and 0 deletions
|
@ -139,6 +139,10 @@ void ClientItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& o
|
|||
break;
|
||||
case ItemLayoutConfigRowElement::ElementDesktopName:
|
||||
{
|
||||
if( tabBox->config().tabBoxMode() == TabBoxConfig::ClientTabBox &&
|
||||
(tabBox->config().clientListMode() == TabBoxConfig::CurrentDesktopClientList) ||
|
||||
(tabBox->config().clientListMode() == TabBoxConfig::CurrentDesktopApplicationList))
|
||||
break;
|
||||
x += paintTextElement( painter, option, index, element, x, y, rowHeight,
|
||||
index.model()->data( index, ClientModel::DesktopNameRole ).toString() );
|
||||
break;
|
||||
|
@ -241,6 +245,10 @@ QSizeF ClientItemDelegate::rowSize( const QModelIndex& index, int row ) const
|
|||
{
|
||||
QSizeF size = textElementSizeHint( index, element,
|
||||
index.model()->data( index, ClientModel::DesktopNameRole ).toString() );
|
||||
if( tabBox->config().tabBoxMode() == TabBoxConfig::ClientTabBox &&
|
||||
(tabBox->config().clientListMode() == TabBoxConfig::CurrentDesktopClientList) ||
|
||||
(tabBox->config().clientListMode() == TabBoxConfig::CurrentDesktopApplicationList))
|
||||
size = QSizeF( 0, 0 );
|
||||
rowWidth += size.width();
|
||||
rowHeight = qMax<qreal>( rowHeight, size.height() );
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue