This commit is contained in:
朱子楚\zhuzi 2023-08-26 17:27:52 +08:00
parent aedb89b34b
commit db74f71e82
2 changed files with 20 additions and 40 deletions

View File

@ -395,30 +395,20 @@ Item {
FluControl{ FluControl{
property var modelData: model property var modelData: model
id:item_control id:item_control
width: layout_list.width - 12 anchors{
height: 34 top: parent.top
x:6 bottom: parent.bottom
y:2 left: parent.left
right: parent.right
topMargin: 2
bottomMargin: 2
leftMargin: 6
rightMargin: 6
}
Drag.active: item_mouse.drag.active Drag.active: item_mouse.drag.active
Drag.hotSpot.x: item_control.width / 2 Drag.hotSpot.x: item_control.width / 2
Drag.hotSpot.y: item_control.height / 2 Drag.hotSpot.y: item_control.height / 2
Drag.dragType: Drag.Automatic Drag.dragType: Drag.Automatic
states: [
State {
when: item_mouse.drag.active
ParentChange {
target: item_control
parent: control
}
AnchorChanges {
target: item_control
anchors {
horizontalCenter: undefined
verticalCenter: undefined
}
}
}
]
MouseArea{ MouseArea{
id:item_mouse id:item_mouse
anchors.fill: parent anchors.fill: parent

View File

@ -396,30 +396,20 @@ Item {
FluControl{ FluControl{
property var modelData: model property var modelData: model
id:item_control id:item_control
width: layout_list.width - 12 anchors{
height: 34 top: parent.top
x:6 bottom: parent.bottom
y:2 left: parent.left
right: parent.right
topMargin: 2
bottomMargin: 2
leftMargin: 6
rightMargin: 6
}
Drag.active: item_mouse.drag.active Drag.active: item_mouse.drag.active
Drag.hotSpot.x: item_control.width / 2 Drag.hotSpot.x: item_control.width / 2
Drag.hotSpot.y: item_control.height / 2 Drag.hotSpot.y: item_control.height / 2
Drag.dragType: Drag.Automatic Drag.dragType: Drag.Automatic
states: [
State {
when: item_mouse.drag.active
ParentChange {
target: item_control
parent: control
}
AnchorChanges {
target: item_control
anchors {
horizontalCenter: undefined
verticalCenter: undefined
}
}
}
]
MouseArea{ MouseArea{
id:item_mouse id:item_mouse
anchors.fill: parent anchors.fill: parent