on xenial help sign in
Use starCount as harmattan
commit7c8e983504418691a06fcdd071378e79503924ad authorAndrea Cimitan <andrea.cimitan@gmail.com> dateMon 28 Oct 2013, 16:00 (13 years ago) parent204c9fa
1 file changed+5−5
Components/RatingStars.qml+5−5
Components/RatingStars.qml+5−5
@@ -38,9 +38,9 @@ Item {
3838 /*!
3939 Number of rating stars.
4040 */
41− property int starsCount: 5
41+ property int starCount: 5
4242
43− readonly property int effectiveRating: MathUtils.clamp(starsCount * rating / maximumRating, 0, maximumRating)
43+ readonly property int effectiveRating: MathUtils.clamp(starCount * rating / maximumRating, 0, maximumRating)
4444
4545 Row {
4646 id: row
@@ -51,9 +51,9 @@ Item {
5151 Repeater {
5252 id: repeater
5353
54− property int averageDelegateWidth: row.width / root.starsCount
54+ property int averageDelegateWidth: row.width / root.starCount
5555
56− model: root.starsCount
56+ model: root.starCount
5757
5858 Image {
5959 objectName: "ratingStar" + index
@@ -65,6 +65,6 @@ Item {
6565 MouseArea {
6666 anchors.fill: row
6767 enabled: root.interactive
68− onClicked: root.rating = Math.ceil(mouse.x / repeater.averageDelegateWidth) * root.maximumRating / root.starsCount
68+ onClicked: root.rating = Math.ceil(mouse.x / repeater.averageDelegateWidth) * root.maximumRating / root.starCount
6969 }
7070}