X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=qml%2FQuickNewsReader%2Fmain.qml;fp=qml%2FQuickNewsReader%2Fmain.qml;h=7000a2ccd48470000b9138e58e7f9d1d9b418d3d;hb=310ac8e6b3fadd9b43c528e6e8ae050e66844c7c;hp=b5c3eaf570d657a5bef94da2465d79df7e530ab1;hpb=2263ab5869648d0eb7d82d8794aae03fd0ce954d;p=quicknewsreader diff --git a/qml/QuickNewsReader/main.qml b/qml/QuickNewsReader/main.qml index b5c3eaf..7000a2c 100644 --- a/qml/QuickNewsReader/main.qml +++ b/qml/QuickNewsReader/main.qml @@ -19,8 +19,9 @@ Rectangle { property variant currentSource: listSourceModel[currentSourceIndex] property bool loading: currentSource.loading - property ListModel windowViewsModel: viewsModel - property ListView windowViewsList: viewsList + property alias windowViewsModel: viewsModel + property alias windowViewsList: viewsList + property alias currentContentX: viewsList.contentX ListModel { id: viewsModel @@ -42,13 +43,18 @@ Rectangle { highlightRangeMode: ListView.StrictlyEnforceRange boundsBehavior: Flickable.StopAtBounds + Behavior on contentX { + NumberAnimation { duration: 500; easing.type: Easing.InOutCubic } + } + model: viewsModel delegate: Loader { id: modelLoader source: component ListView.onAdd: { - viewsList.currentIndex = componentDepth + viewsList.contentX = componentDepth*window.width + //viewsList.currentIndex = componentDepth // doesn't work well with Qt 4.7.3 on Maemo... } } }