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