Skip to content

Commit

Permalink
fix: blank page appears after dragging the item to turn page or click…
Browse files Browse the repository at this point in the history
…ing the page turning indicator.

After dragging the item in full screen mode and clicking the page turning indicator, or dragging item to turn page, a blank page appears.

Log: fix blank page appears after dragging the item to turning page
Issue: linuxdeepin/developer-center#8358
Issue: linuxdeepin/developer-center#8363
Influence: dragging item, then full screen display normal
  • Loading branch information
yixinshark committed May 9, 2024
1 parent 33b50bf commit d0bb0e1
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions qml/IconItemDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ Control {
// Item will be hidden by checking the dndItem.currentlyDraggedId property. We assign the value
// to that property here
dndItem.currentlyDraggedId = root.Drag.mimeData["text/x-dde-launcher-dnd-desktopId"]
// TODO: This way we couldn't give it an image size hint,
dndItem.Drag.imageSource = root.Drag.imageSource
dndItem.Drag.hotSpot = root.Drag.hotSpot
Qt.callLater(function() {
dndItem.Drag.mimeData = root.Drag.mimeData
dndItem.Drag.mimeData = root.Drag.mimeData

iconLoader.grabToImage(function(result) {
dndItem.Drag.imageSource = result.url;
dndItem.Drag.active = true
dndItem.Drag.startDrag()
})
Expand Down Expand Up @@ -166,9 +166,6 @@ Control {
onPressedChanged: {
if (pressed) {
root.Drag.hotSpot = mapToItem(iconLoader, point.pressPosition)
iconLoader.grabToImage(function(result) {
root.Drag.imageSource = result.url;
})
}
}
onTapped: {
Expand Down

0 comments on commit d0bb0e1

Please sign in to comment.