Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions qml/FullscreenFrame.qml
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ Control {
"text/x-dde-launcher-dnd-desktopId": model.desktopId
}
visible: dndItem.currentlyDraggedId !== model.desktopId
iconSource: "image://app-icon/" + DTK.platformTheme.iconThemeName + "/" + iconName
iconSource: iconName
icons: folderIcons
padding: 5
onItemClicked: {
Expand Down Expand Up @@ -342,7 +342,7 @@ Control {
id: delegateSearchResultModel
model: SearchFilterProxyModel
delegate: IconItemDelegate {
iconSource: "image://app-icon/" + DTK.platformTheme.iconThemeName + "/" + iconName
iconSource: iconName
width: searchResultGridViewContainer.cellSize
height: searchResultGridViewContainer.cellSize
padding: 5
Expand Down Expand Up @@ -515,7 +515,7 @@ Control {
"text/x-dde-launcher-dnd-desktopId": model.desktopId
}
visible: dndItem.currentlyDraggedId !== model.desktopId
iconSource: "image://app-icon/" + DTK.platformTheme.iconThemeName + "/" + iconName
iconSource: iconName

padding: 5
onItemClicked: {
Expand Down
8 changes: 4 additions & 4 deletions qml/IconItemDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ Control {
Component {
id: imageComponent

Image {
id: iconImage
DciIcon {
objectName: "appIcon"
anchors.fill: parent
source: iconSource
name: iconSource
sourceSize: Qt.size(parent.width, parent.height)
}
}
Expand Down Expand Up @@ -158,7 +158,7 @@ Control {
// to that property here
dndItem.currentlyDraggedId = parent.Drag.mimeData["text/x-dde-launcher-dnd-desktopId"]
// TODO: This way we couldn't give it an image size hint,
dndItem.Drag.imageSource = icons ? ("image://folder-icon/" + icons.join(':')) : parent.iconSource
dndItem.Drag.imageSource = icons ? ("image://folder-icon/" + icons.join(':')) : ("image://app-icon/" + DTK.platformTheme.iconThemeName + "/" + parent.iconSource)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里还需要使用app-icon的provider么,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有别的合适的方案么?

Qt.callLater(function() {
dndItem.Drag.mimeData = parent.Drag.mimeData
dndItem.Drag.active = true
Expand Down
4 changes: 2 additions & 2 deletions qml/WindowedFrame.qml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ StackView {
id: delegateFavorateModel
model: FavoritedProxyModel
delegate: IconItemDelegate {
iconSource: "image://app-icon/" + DTK.platformTheme.iconThemeName + "/" + iconName
iconSource: iconName
width: favoriteGridViewContainer.cellSize
height: favoriteGridViewContainer.cellSize
onItemClicked: {
Expand Down Expand Up @@ -198,7 +198,7 @@ StackView {
id: delegateAllAppsModel
model: SearchFilterProxyModel
delegate: IconItemDelegate {
iconSource: "image://app-icon/" + DTK.platformTheme.iconThemeName + "/" + iconName
iconSource: iconName
width: allAppsGridContainer.cellSize
height: allAppsGridContainer.cellSize
onItemClicked: {
Expand Down