mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-29 06:08:48 +03:00
Add delay to showing scroll down button
This commit is contained in:
parent
0d9a3ff4cd
commit
cb76777fce
1 changed files with 19 additions and 25 deletions
|
@ -763,7 +763,7 @@ Item {
|
||||||
rightMargin: Nheko.paddingMedium+(fullWidth-width)/2
|
rightMargin: Nheko.paddingMedium+(fullWidth-width)/2
|
||||||
}
|
}
|
||||||
property int fullWidth: 40
|
property int fullWidth: 40
|
||||||
width: fullWidth
|
width: 0
|
||||||
height: width
|
height: width
|
||||||
radius: width/2
|
radius: width/2
|
||||||
onClicked: chat.positionViewAtBeginning();
|
onClicked: chat.positionViewAtBeginning();
|
||||||
|
@ -778,10 +778,17 @@ Item {
|
||||||
radius: toEndButton.radius
|
radius: toEndButton.radius
|
||||||
}
|
}
|
||||||
|
|
||||||
states: State {
|
states: [
|
||||||
name: "hidden"
|
State {
|
||||||
when: chat.atYEnd
|
name: ""
|
||||||
|
PropertyChanges { target: toEndButton; width: 0 }
|
||||||
|
},
|
||||||
|
State {
|
||||||
|
name: "shown"
|
||||||
|
when: !chat.atYEnd
|
||||||
|
PropertyChanges { target: toEndButton; width: toEndButton.fullWidth }
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: buttonImg
|
id: buttonImg
|
||||||
|
@ -791,33 +798,20 @@ Item {
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
}
|
}
|
||||||
|
|
||||||
transitions: [
|
transitions: Transition {
|
||||||
Transition {
|
|
||||||
from: ""
|
from: ""
|
||||||
to: "hidden"
|
to: "shown"
|
||||||
|
reversible: true
|
||||||
|
|
||||||
|
SequentialAnimation {
|
||||||
|
PauseAnimation { duration: 500 }
|
||||||
PropertyAnimation {
|
PropertyAnimation {
|
||||||
target: toEndButton
|
target: toEndButton
|
||||||
properties: "width"
|
properties: "width"
|
||||||
easing.type: Easing.InOutQuad
|
easing.type: Easing.InOutQuad
|
||||||
from: 40
|
|
||||||
to: 0
|
|
||||||
duration: 200
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Transition {
|
|
||||||
from: "hidden"
|
|
||||||
to: ""
|
|
||||||
|
|
||||||
PropertyAnimation {
|
|
||||||
target: toEndButton
|
|
||||||
properties: "width"
|
|
||||||
easing.type: Easing.InOutQuad
|
|
||||||
from: 0
|
|
||||||
to: 40
|
|
||||||
duration: 200
|
duration: 200
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue