Trash: Add animation
This commit is contained in:
parent
7cfdfe040a
commit
668e365b43
2 changed files with 21 additions and 3 deletions
|
@ -160,13 +160,13 @@ Item {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: activeRect
|
id: activeRect
|
||||||
|
|
||||||
property var leftX: 3
|
property var leftX: 2
|
||||||
property var leftY: (parent.height - height) / 2
|
property var leftY: (parent.height - height) / 2
|
||||||
|
|
||||||
property var bottomX: (parent.width - width) / 2
|
property var bottomX: (parent.width - width) / 2
|
||||||
property var bottomY: icon.y + icon.height + activeRect.height / 2 - 2
|
property var bottomY: icon.y + icon.height + activeRect.height / 2 - 1
|
||||||
|
|
||||||
property var rightX: icon.x + icon.width + activeRect.width / 2 - 2
|
property var rightX: icon.x + icon.width + activeRect.width / 2 - 1
|
||||||
property var rightY: (parent.height - height) / 2
|
property var rightY: (parent.height - height) / 2
|
||||||
|
|
||||||
property var circleSize: isBottom ? control.height * 0.06 : control.width * 0.06
|
property var circleSize: isBottom ? control.height * 0.06 : control.width * 0.06
|
||||||
|
|
18
qml/main.qml
18
qml/main.qml
|
@ -133,6 +133,24 @@ Item {
|
||||||
onClicked: trash.openTrash()
|
onClicked: trash.openTrash()
|
||||||
onRightClicked: trashMenu.popup()
|
onRightClicked: trashMenu.popup()
|
||||||
|
|
||||||
|
dropArea.enabled: true
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.margins: FishUI.Units.smallSpacing / 2
|
||||||
|
color: "transparent"
|
||||||
|
border.color: FishUI.Theme.textColor
|
||||||
|
radius: height * 0.3
|
||||||
|
border.width: 1
|
||||||
|
opacity: trashItem.dropArea.containsDrag ? 0.8 : 0
|
||||||
|
|
||||||
|
Behavior on opacity {
|
||||||
|
NumberAnimation {
|
||||||
|
duration: 200
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
FishUI.DesktopMenu {
|
FishUI.DesktopMenu {
|
||||||
id: trashMenu
|
id: trashMenu
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue