From 551bcc2959f8d53b2bde67812f805d2eae789f77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 18 Mar 2010 09:54:03 +0000 Subject: [PATCH] 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 --- tabbox/clientitemdelegate.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tabbox/clientitemdelegate.cpp b/tabbox/clientitemdelegate.cpp index 94196e9dcf..e6de1244ec 100644 --- a/tabbox/clientitemdelegate.cpp +++ b/tabbox/clientitemdelegate.cpp @@ -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( rowHeight, size.height() ); break;