diff options
| author | Frank Reininghaus <[email protected]> | 2009-05-16 10:45:13 +0000 |
|---|---|---|
| committer | Frank Reininghaus <[email protected]> | 2009-05-16 10:45:13 +0000 |
| commit | e5d6bea2a47b849ea08f952170b3a564f408be69 (patch) | |
| tree | 8f46bd758288754f068d13961809bd2aee77b907 /src/dolphinfileitemdelegate.cpp | |
| parent | eb92d74461aeeca2ec8177b6ff182a46dda12ffd (diff) | |
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: [email protected]
svn path=/trunk/KDE/kdebase/apps/; revision=968589
Diffstat (limited to 'src/dolphinfileitemdelegate.cpp')
| -rw-r--r-- | src/dolphinfileitemdelegate.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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); } |
