on xenial help sign in
fix spread looking out of place when there's only one item
b2f2f1cMichael Zanetti
qml/Stage/Spread/Spread.qml+1−1
@@ -91,7 +91,7 @@ Item {
91
91
92 readonly property real visibleItemCount: (spreadWidth / spreadItemWidth) / (1 - itemOverlap)
92 readonly property real visibleItemCount: (spreadWidth / spreadItemWidth) / (1 - itemOverlap)
93
93
94− readonly property real spreadTotalWidth: totalItemCount * spreadWidth / visibleItemCount
94+ readonly property real spreadTotalWidth: Math.max(2,totalItemCount) * spreadWidth / visibleItemCount
95
95
96 readonly property real centeringOffset: Math.max(spreadWidth - spreadTotalWidth ,0) / (2 * spreadWidth)
96 readonly property real centeringOffset: Math.max(spreadWidth - spreadTotalWidth ,0) / (2 * spreadWidth)
97
97