mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 06:19:02 +08:00
Animate scrolling focussed item into view
This commit is contained in:
parent
edee53b0b1
commit
8917762ed5
@ -300,13 +300,23 @@ Item
|
|||||||
}
|
}
|
||||||
onFocusReceived:
|
onFocusReceived:
|
||||||
{
|
{
|
||||||
|
animateContentY.from = contents.contentY;
|
||||||
contents.positionViewAtIndex(index, ListView.Contain);
|
contents.positionViewAtIndex(index, ListView.Contain);
|
||||||
|
animateContentY.to = contents.contentY;
|
||||||
|
animateContentY.running = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.I18nCatalog { id: catalog; name: "cura"; }
|
UM.I18nCatalog { id: catalog; name: "cura"; }
|
||||||
|
|
||||||
|
NumberAnimation {
|
||||||
|
id: animateContentY
|
||||||
|
target: contents
|
||||||
|
property: "contentY"
|
||||||
|
duration: 50
|
||||||
|
}
|
||||||
|
|
||||||
add: Transition {
|
add: Transition {
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
NumberAnimation { properties: "height"; from: 0; duration: 100 }
|
NumberAnimation { properties: "height"; from: 0; duration: 100 }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user