diff --git a/debian/changelog b/debian/changelog index f86aaf50..de47ccfe 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +dde-launchpad (2.0.30) unstable; urgency=medium + + * fix: correct mouse event handling area for icon items + + -- YeShanShan Fri, 06 Mar 2026 16:16:24 +0800 + dde-launchpad (2.0.29) unstable; urgency=medium * fix: fix font weight property assignment diff --git a/qml/windowed/IconItemDelegate.qml b/qml/windowed/IconItemDelegate.qml index 11d848f5..6559cdc7 100644 --- a/qml/windowed/IconItemDelegate.qml +++ b/qml/windowed/IconItemDelegate.qml @@ -45,6 +45,26 @@ Control { ColorSelector.pressed: false ColorSelector.family: Palette.CrystalColor flat: true + MouseArea { + id: mouseArea + anchors.fill: parent + hoverEnabled: false + acceptedButtons: Qt.LeftButton + enabled: root.dndEnabled + drag.target: root + onPressed: function (mouse) { + if (mouse.button === Qt.LeftButton && root.dndEnabled) { + appIcon.grabToImage(function(result) { + root.Drag.imageSource = result.url; + }) + } + } + onClicked: { + if (!drag.active) { + root.itemClicked() + } + } + } contentItem: Column { anchors.fill: parent @@ -73,27 +93,6 @@ Control { palette: DTK.makeIconPalette(root.palette) theme: ApplicationHelper.DarkType } - - MouseArea { - id: mouseArea - anchors.fill: parent - hoverEnabled: false - acceptedButtons: Qt.LeftButton - enabled: root.dndEnabled - drag.target: root - onPressed: function (mouse) { - if (mouse.button === Qt.LeftButton && root.dndEnabled) { - appIcon.grabToImage(function(result) { - root.Drag.imageSource = result.url; - }) - } - } - onClicked: { - if (!drag.active) { - root.itemClicked() - } - } - } } // as topMargin