mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-25 11:51:41 -07: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:
|
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…
Add table
Add a link
Reference in a new issue