mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 21:44:01 -06:00
Animate scrolling focussed item into view
This commit is contained in:
parent
edee53b0b1
commit
8917762ed5
1 changed files with 10 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue