~manhattan-team/+junk/carousel.listview

« back to all changes in this revision

Viewing changes to Carousel.qml

  • Committer: Andrea Cimitan
  • Date: 2013-01-31 19:27:24 UTC
  • Revision ID: andrea.cimitan@gmail.com-20130131192724-x88g20bw641qlrfe
Should improve translation, fixing 1 pixel

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
 
119
119
                    property bool explicitScale: !flickable.moving && flickable.newContentX < 0 && Math.abs(index - view.selectedIndex) < 0.5
120
120
                    property real explicitScaleFactor: explicitScale ? 1.1 : 1
 
121
                    property real itemTranslationScale: CarouselJS.getItemScale(index,
 
122
                                                                                (index + 0.5), // good approximation of scale while changing selected item
 
123
                                                                                flickable.contentWidth / flickable.tileWidth,
 
124
                                                                                flickable.visibleTilesScaleFactor)
121
125
                    property real itemScale: CarouselJS.getItemScale(index,
122
126
                                                                     view.selectedIndex,
123
127
                                                                     flickable.contentWidth / flickable.tileWidth,
127
131
                                                                              view.selectedIndex,
128
132
                                                                              flickable.tileWidth,
129
133
                                                                              itemScale,
 
134
                                                                              itemTranslationScale,
130
135
                                                                              flickable.scaleFactor)
131
136
 
132
137
                    width: flickable.tileWidth