Click the middle mouse button to open a new window
This commit is contained in:
parent
38fb82e0b1
commit
2b40e07e8a
2 changed files with 10 additions and 12 deletions
|
@ -51,9 +51,15 @@ DockItem {
|
|||
|
||||
onPositionChanged: updateGeometry()
|
||||
onPressed: updateGeometry()
|
||||
onClicked: appModel.clicked(model.appId)
|
||||
onRightClicked: if (model.appId !== "cutefish-launcher") contextMenu.show()
|
||||
|
||||
onClicked: {
|
||||
if (mouse.button === Qt.LeftButton)
|
||||
appModel.clicked(model.appId)
|
||||
else if (mouse.button === Qt.MiddleButton)
|
||||
appModel.openNewInstance(model.appId)
|
||||
}
|
||||
|
||||
dropArea.onEntered: {
|
||||
if (drag.source)
|
||||
appModel.move(drag.source.dragItemIndex, appItem.dragItemIndex)
|
||||
|
|
|
@ -100,7 +100,7 @@ Item {
|
|||
id: iconArea
|
||||
anchors.fill: icon
|
||||
hoverEnabled: true
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
|
||||
drag.axis: Drag.XAndYAxis
|
||||
|
||||
onClicked: {
|
||||
|
@ -177,28 +177,20 @@ Item {
|
|||
radius: !isBottom ? width / 2 : height / 2
|
||||
visible: enableActivateDot && !dragStarted
|
||||
color: FishUI.Theme.textColor
|
||||
opacity: 1.0
|
||||
|
||||
x: isLeft ? leftX : isBottom ? bottomX : rightX
|
||||
y: isLeft ? leftY : isBottom ? bottomY : rightY
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: 200
|
||||
easing.type: Easing.InOutSine
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on width {
|
||||
NumberAnimation {
|
||||
duration: isBottom ? 200 : 0
|
||||
duration: isBottom ? 250 : 0
|
||||
easing.type: Easing.InOutSine
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on height {
|
||||
NumberAnimation {
|
||||
duration: !isBottom ? 200 : 0
|
||||
duration: !isBottom ? 250 : 0
|
||||
easing.type: Easing.InOutSine
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue