From e5d6bea2a47b849ea08f952170b3a564f408be69 Mon Sep 17 00:00:00 2001 From: Frank Reininghaus Date: Sat, 16 May 2009 10:45:13 +0000 Subject: [PATCH] Set the font to italic for symbolic links before calculating the size of the area which is made available to KFileItemDelegate::paint. Fixes the problem that Dolphin truncates the names of some symbolic links if the italic version of the font needs more space than the non-italic one. BUG: 183620 CCMAIL: fredrikh@kde.org svn path=/trunk/KDE/kdebase/apps/; revision=968589 --- src/dolphinfileitemdelegate.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dolphinfileitemdelegate.cpp b/src/dolphinfileitemdelegate.cpp index 3fa05cbb5..9be70647b 100644 --- a/src/dolphinfileitemdelegate.cpp +++ b/src/dolphinfileitemdelegate.cpp @@ -48,6 +48,10 @@ void DolphinFileItemDelegate::paint(QPainter* painter, const QModelIndex dirIndex = proxyModel->mapToSource(index); const KFileItem item = dirModel->itemForIndex(dirIndex); if (!item.isNull()) { + // Symbolic links are displayed in an italic font + if (item.isLink()) + opt.font.setItalic(true); + const int width = nameColumnWidth(item.text(), opt); opt.rect.setWidth(width); } -- 2.47.3