Add link symbol
This commit is contained in:
parent
48934e1533
commit
d091f6f9a2
5 changed files with 27 additions and 2 deletions
4
debian/changelog
vendored
4
debian/changelog
vendored
|
@ -1,5 +1,5 @@
|
|||
cutefish-filemanager (0.5.1) UNRELEASED; urgency=high
|
||||
cutefish-filemanager (0.5.1-2) UNRELEASED; urgency=high
|
||||
|
||||
* Initial release (CutefishOS) <support@cutefishos.com>
|
||||
|
||||
-- CutefishOS Packaging Team <support@cutefishos.com> Sat, 09 Oct 2021 11:01:00 +0800
|
||||
-- CutefishOS Packaging Team <support@cutefishos.com> Fri, 15 Oct 2021 22:53:38 +0800
|
|
@ -152,6 +152,7 @@ QHash<int, QByteArray> FolderModel::staticRoleNames()
|
|||
roleNames[SelectedRole] = "selected";
|
||||
roleNames[IsDirRole] = "isDir";
|
||||
roleNames[IsHiddenRole] = "isHidden";
|
||||
roleNames[IsLinkRole] = "isLink";
|
||||
roleNames[UrlRole] = "url";
|
||||
roleNames[DisplayNameRole] = "displayName";
|
||||
roleNames[FileNameRole] = "fileName";
|
||||
|
@ -195,6 +196,9 @@ QVariant FolderModel::data(const QModelIndex &index, int role) const
|
|||
case IsHiddenRole: {
|
||||
return item.isHidden();
|
||||
}
|
||||
case IsLinkRole: {
|
||||
return item.isLink();
|
||||
}
|
||||
case FileSizeRole: {
|
||||
if (item.isDir()) {
|
||||
QDir dir(item.url().toLocalFile());
|
||||
|
|
|
@ -67,6 +67,7 @@ public:
|
|||
SelectedRole,
|
||||
IsDirRole,
|
||||
IsHiddenRole,
|
||||
IsLinkRole,
|
||||
UrlRole,
|
||||
DisplayNameRole,
|
||||
FileNameRole,
|
||||
|
|
|
@ -166,6 +166,16 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
anchors.right: _icon.visible ? _icon.right : _image.right
|
||||
anchors.bottom: _icon.visible ? _icon.bottom : _image.bottom
|
||||
source: "image://icontheme/emblem-symbolic-link"
|
||||
width: 16
|
||||
height: 16
|
||||
visible: model.isLink
|
||||
sourceSize: Qt.size(width, height)
|
||||
}
|
||||
|
||||
// ColorOverlay {
|
||||
// id: _selectedColorOverlay
|
||||
// anchors.fill: _image.visible ? _image : _icon
|
||||
|
|
|
@ -116,6 +116,16 @@ Item {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
anchors.right: _icon.visible ? _icon.right : _image.right
|
||||
anchors.bottom: _icon.visible ? _icon.bottom : _image.bottom
|
||||
source: "image://icontheme/emblem-symbolic-link"
|
||||
width: 16
|
||||
height: 16
|
||||
visible: model.isLink
|
||||
sourceSize: Qt.size(width, height)
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
|
|
Loading…
Reference in a new issue