mirror of https://gitee.com/openkylin/peony.git
[FIX]修复桌面文件设置多个角标后左上角不显示角标的问题[LINK]bug#132955
This commit is contained in:
parent
deeba79f19
commit
1ee96d4050
|
@ -227,7 +227,6 @@ void DesktopIconViewDelegate::paint(QPainter *painter, const QStyleOptionViewIte
|
|||
//paint link icon and locker icon
|
||||
FileInfo* file = FileInfo::fromUri(index.data(Qt::UserRole).toString()).get();
|
||||
if ((index.data(Qt::UserRole).toString() != "computer:///") && (index.data(Qt::UserRole).toString() != "trash:///")) {
|
||||
emblemPoses.removeOne(1);
|
||||
QSize lockerIconSize = QSize(16, 16);
|
||||
int offset = 8;
|
||||
switch (view->zoomLevel()) {
|
||||
|
@ -260,12 +259,14 @@ void DesktopIconViewDelegate::paint(QPainter *painter, const QStyleOptionViewIte
|
|||
|
||||
if (! file->canRead())
|
||||
{
|
||||
emblemPoses.removeOne(1);
|
||||
QIcon symbolicLinkIcon = QIcon::fromTheme("emblem-unreadable");
|
||||
symbolicLinkIcon.paint(painter, linkRect, Qt::AlignCenter);
|
||||
}
|
||||
else if(! file->canWrite()/* && ! file->canExecute()*/)
|
||||
{
|
||||
//只读图标对应可读不可写情况,与可执行权限无关,link to bug#99998
|
||||
emblemPoses.removeOne(1);
|
||||
QIcon symbolicLinkIcon = QIcon::fromTheme("emblem-readonly");
|
||||
symbolicLinkIcon.paint(painter, linkRect, Qt::AlignCenter);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue