mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 12:38:48 +03:00
Animate transition to blurhash
This commit is contained in:
parent
66d8a38c80
commit
c9e3ad1850
1 changed files with 44 additions and 0 deletions
|
@ -66,6 +66,50 @@ AbstractButton {
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
sourceSize.width: parent.width * Screen.devicePixelRatio
|
sourceSize.width: parent.width * Screen.devicePixelRatio
|
||||||
sourceSize.height: parent.height * Screen.devicePixelRatio
|
sourceSize.height: parent.height * Screen.devicePixelRatio
|
||||||
|
state: img.status != Image.Ready ? "Visible" : (timeline.privacyScreen.active ? "Visible" : "Invisible")
|
||||||
|
|
||||||
|
states: [
|
||||||
|
State {
|
||||||
|
name: "Visible"
|
||||||
|
|
||||||
|
PropertyChanges {
|
||||||
|
target: blurhash_
|
||||||
|
opacity: 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
State {
|
||||||
|
name: "Invisible"
|
||||||
|
|
||||||
|
PropertyChanges {
|
||||||
|
target: blurhash_
|
||||||
|
opacity: 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
transitions: [
|
||||||
|
Transition {
|
||||||
|
from: "Visible"
|
||||||
|
to: "Invisible"
|
||||||
|
|
||||||
|
NumberAnimation {
|
||||||
|
target: blurhash_
|
||||||
|
property: "opacity"
|
||||||
|
duration: 250
|
||||||
|
easing.type: Easing.InQuad
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Transition {
|
||||||
|
from: "Invisible"
|
||||||
|
to: "Visible"
|
||||||
|
|
||||||
|
NumberAnimation {
|
||||||
|
target: blurhash_
|
||||||
|
property: "opacity"
|
||||||
|
duration: 500
|
||||||
|
easing.type: Easing.InQuad
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
onClicked: Settings.openImageExternal ? room.openMedia(eventId) : TimelineManager.openImageOverlay(room, url, eventId, originalWidth, proportionalHeight);
|
onClicked: Settings.openImageExternal ? room.openMedia(eventId) : TimelineManager.openImageOverlay(room, url, eventId, originalWidth, proportionalHeight);
|
||||||
|
|
Loading…
Reference in a new issue