mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
If no user icon present, show a generic one
svn path=/trunk/KDE/kdebase/apps/; revision=685426
This commit is contained in:
parent
77d3d37246
commit
90ca3c31dc
1 changed files with 8 additions and 1 deletions
|
@ -274,7 +274,14 @@ void DolphinItemCategorizer::drawCategory(const QModelIndex &index,
|
|||
case DolphinView::SortByOwner: {
|
||||
opt.rect.setTop(option.rect.top() + (iconSize / 4));
|
||||
KUser user(category);
|
||||
icon = QPixmap::fromImage(QImage(user.homeDir() + QDir::separator() + ".face.icon")).scaled(iconSize, iconSize);
|
||||
if (QFile::exists(user.homeDir() + QDir::separator() + ".face.icon"))
|
||||
{
|
||||
icon = QPixmap::fromImage(QImage(user.homeDir() + QDir::separator() + ".face.icon")).scaled(iconSize, iconSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
icon = KIconLoader::global()->loadIcon("user", K3Icon::Small);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue