Skip to content

Commit 1ef99ed

Browse files
committed
chore: bump version to 2.0.16
update changelog to 2.0.16
1 parent c2cf6a1 commit 1ef99ed

File tree

4 files changed

+151
-3
lines changed

4 files changed

+151
-3
lines changed

debian/changelog

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
dde-shell (2.0.16) unstable; urgency=medium
2+
3+
* feat: implement trash empty state detection
4+
* feat: add camera status OSD notifications
5+
* i18n: Updates for project Deepin Desktop Environment (#1315)
6+
* fix: disable dock panel dragging when locked
7+
* fix: correct bubble ID handling in notification system
8+
* feat: set focus to first expanded notification item
9+
* feat: enhance window identification with ApplicationManager
10+
* feat: add modal property to notification setting menu
11+
* refactor: optimize expired notification cleanup implementation
12+
* Revert "feat: add trash file drop support"
13+
14+
-- Robertkill <[email protected]> Thu, 30 Oct 2025 20:11:23 +0800
15+
116
dde-shell (2.0.15) unstable; urgency=medium
217

318
* fix: add missing definitions for dockpanel

frame/qml/PanelToolTip.qml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Item {
4646

4747
function open()
4848
{
49+
console.warn("PanelToolTip::open called for text:", text)
4950
if (!toolTipWindow)
5051
return
5152

@@ -73,6 +74,7 @@ Item {
7374

7475
function close()
7576
{
77+
console.warn("PanelToolTip::close called for text:", text)
7678
if (!toolTipWindow)
7779
return
7880

panels/dock/dockpositioner.cpp

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,43 @@ void DockPositioner::setY(int y)
103103

104104
void DockPositioner::update()
105105
{
106+
// 如果位置没有实质性变化,不重新计算
107+
const auto newBounding = m_bounding;
108+
const auto dockWindowRect = dockGeometry();
109+
110+
int xPosition = 0;
111+
int yPosition = 0;
112+
switch (dockPosition()) {
113+
case dock::Top: {
114+
xPosition = newBounding.x();
115+
yPosition = newBounding.y();
116+
break;
117+
}
118+
case dock::Right: {
119+
xPosition = newBounding.x() - newBounding.width();
120+
yPosition = newBounding.y();
121+
break;
122+
}
123+
case dock::Bottom: {
124+
xPosition = newBounding.x();
125+
yPosition = newBounding.y() - newBounding.height();
126+
break;
127+
}
128+
case dock::Left: {
129+
xPosition = newBounding.x();
130+
yPosition = newBounding.y();
131+
break;
132+
}
133+
default:
134+
break;
135+
}
136+
137+
// 如果新计算的位置与当前位置相同,不触发更新
138+
if (m_x == xPosition && m_y == yPosition) {
139+
qWarning() << "DockPositioner::update: position unchanged, skipping update";
140+
return;
141+
}
142+
106143
m_positionTimer->start();
107144
}
108145

@@ -201,6 +238,10 @@ void DockPanelPositioner::updatePosition()
201238
int yPosition = 0;
202239
int horizontalOffset = m_horizontalOffset == -1 ? m_bounding.width() / 2 : m_horizontalOffset;
203240
int vertialOffset = m_vertialOffset == -1 ? m_bounding.height() / 2 : m_vertialOffset;
241+
242+
qWarning() << "DockPanelPositioner::updatePosition called for" << parent()->objectName()
243+
<< "bounding:" << m_bounding << "dockPosition:" << dockPosition();
244+
204245
switch (dockPosition()) {
205246
case dock::Top: {
206247
xPosition = m_bounding.x() - horizontalOffset;
@@ -226,6 +267,8 @@ void DockPanelPositioner::updatePosition()
226267
break;
227268
}
228269

270+
qWarning() << "DockPanelPositioner::updatePosition result - x:" << xPosition << "y:" << yPosition;
271+
229272
setX(xPosition);
230273
setY(yPosition);
231274
}

panels/dock/taskmanager/package/AppItem.qml

Lines changed: 91 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,15 @@ Item {
306306
if (!drag.active) {
307307
Panel.contextDragging = false
308308
root.dragFinished()
309+
// 确保拖拽结束时关闭回收站提示
310+
if (root.itemId === "dde-trash") {
311+
console.warn("MouseArea drag.onActiveChanged: drag finished, closing dragToolTip for trash")
312+
isDragOver = false
313+
shouldShowTooltip = false
314+
tooltipVisible = false
315+
tooltipDelayTimer.stop()
316+
dragToolTip.close()
317+
}
309318
return
310319
}
311320
Panel.contextDragging = true
@@ -409,24 +418,103 @@ Item {
409418
DropArea {
410419
anchors.fill: parent
411420
keys: ["dfm_app_type_for_drag"]
421+
422+
property bool isDragOver: false
423+
property var lastDragPosition: Qt.point(0, 0)
424+
property int dragStableThreshold: 5 // 像素阈值,小于这个距离的移动不重新计算位置
425+
property bool shouldShowTooltip: false
426+
property int lastEnterTime: 0
427+
property int lastExitTime: 0
428+
property int debounceThreshold: 50 // 50ms防抖阈值,更严格的防抖
429+
property bool tooltipVisible: false
412430

413431
onEntered: function (drag) {
432+
var currentTime = Date.now()
433+
console.warn("AppItem DropArea onEntered:", root.itemId, "drag entered at time", currentTime, "last exit:", lastExitTime, "diff:", currentTime - lastExitTime)
434+
435+
// 如果距离上次退出时间太短,忽略这次进入事件
436+
if (currentTime - lastExitTime < debounceThreshold) {
437+
console.warn("AppItem DropArea onEntered: ignoring rapid enter event, too soon after exit")
438+
return
439+
}
440+
414441
if (root.itemId === "dde-trash") {
415-
var point = root.mapToItem(null, root.width / 2, root.height / 2)
416-
dragToolTip.DockPanelPositioner.bounding = Qt.rect(point.x, point.y, dragToolTip.width, dragToolTip.height)
417-
dragToolTip.open()
442+
isDragOver = true
443+
lastDragPosition = Qt.point(drag.x, drag.y)
444+
lastEnterTime = currentTime
445+
shouldShowTooltip = true
446+
// 如果提示已经显示,不再重新显示
447+
if (!tooltipVisible) {
448+
// 使用定时器延迟显示,避免快速切换
449+
tooltipDelayTimer.start()
450+
}
418451
}
419452
}
420453

421454
onExited: function (drag) {
455+
var currentTime = Date.now()
456+
console.warn("AppItem DropArea onExited:", root.itemId, "drag exited at time", currentTime, "last enter:", lastEnterTime, "diff:", currentTime - lastEnterTime)
457+
458+
// 如果距离上次进入时间太短,忽略这次退出事件
459+
if (currentTime - lastEnterTime < debounceThreshold) {
460+
console.warn("AppItem DropArea onExited: ignoring rapid exit event, too soon after enter")
461+
return
462+
}
463+
422464
if (root.itemId === "dde-trash") {
465+
isDragOver = false
466+
lastExitTime = currentTime
467+
shouldShowTooltip = false
468+
tooltipVisible = false
469+
tooltipDelayTimer.stop()
470+
console.warn("AppItem DropArea onExited: closing dragToolTip for trash")
423471
dragToolTip.close()
424472
}
425473
}
474+
475+
onPositionChanged: function (drag) {
476+
if (root.itemId === "dde-trash" && isDragOver && drag) {
477+
var currentPos = Qt.point(drag.x, drag.y)
478+
var distance = Math.sqrt(Math.pow(currentPos.x - lastDragPosition.x, 2) + Math.pow(currentPos.y - lastDragPosition.y, 2))
479+
480+
console.warn("AppItem DropArea onPositionChanged: drag moved", distance, "pixels, threshold:", dragStableThreshold)
481+
482+
// 只有当移动距离超过阈值时才更新提示位置
483+
if (distance > dragStableThreshold) {
484+
lastDragPosition = currentPos
485+
var point = root.mapToItem(null, root.width / 2, root.height / 2)
486+
console.warn("AppItem DropArea onPositionChanged: updating dragToolTip position to", point.x, point.y)
487+
dragToolTip.DockPanelPositioner.bounding = Qt.rect(point.x, point.y, dragToolTip.width, dragToolTip.height)
488+
}
489+
}
490+
}
426491

427492
onDropped: function (drop){
493+
console.warn("AppItem DropArea onDropped: files dropped on", root.itemId)
494+
if (root.itemId === "dde-trash") {
495+
isDragOver = false
496+
shouldShowTooltip = false
497+
tooltipVisible = false
498+
tooltipDelayTimer.stop()
499+
dragToolTip.close()
500+
console.warn("AppItem DropArea onDropped: closing dragToolTip for trash after drop")
501+
}
428502
root.dropFilesOnItem(root.itemId, drop.urls)
429503
}
504+
505+
Timer {
506+
id: tooltipDelayTimer
507+
interval: 50 // 50ms延迟,更快的响应
508+
onTriggered: {
509+
if (shouldShowTooltip && isDragOver) {
510+
var point = root.mapToItem(null, root.width / 2, root.height / 2)
511+
console.warn("AppItem DropArea tooltipDelayTimer: opening dragToolTip for trash at point", point.x, point.y)
512+
dragToolTip.DockPanelPositioner.bounding = Qt.rect(point.x, point.y, dragToolTip.width, dragToolTip.height)
513+
dragToolTip.open()
514+
tooltipVisible = true
515+
}
516+
}
517+
}
430518
}
431519

432520
onWindowsChanged: {

0 commit comments

Comments
 (0)