Skip to content
Merged
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
8 changes: 6 additions & 2 deletions panels/dock/tray/quickpanel/PluginItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ Control {
property string itemKey
property alias shellSurface: surfaceLayer.shellSurface
property alias traySurface: dragLayer.fallbackDragImage
property bool canDrag: true
// 根据插件的 pluginFlags 判断是否可拖动
// Attribute_CanDrag = 0x200,如果 flags 中包含此标志则可拖动
readonly property bool canDragByFlags: shellSurface ? (shellSurface.pluginFlags & 0x200) !== 0 : true
property bool canDrag: canDragByFlags
property int radius: 8
property bool isActive
function updateSurface()
Expand All @@ -39,7 +42,8 @@ Control {
if (type === 2) {
canDrag = false
} else if (type === 3) {
canDrag = true
// 鼠标释放时恢复到基于 Attribute_CanDrag 的判断结果
canDrag = canDragByFlags
}
}
}
Expand Down