@@ -1,5 +1,5 @@
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2013 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -16,11 +16,26 @@
17import QtQuick 2.0
17import QtQuick 2.0
19−// FIXME this goes away when new scopes go in: compatibility layer with old RatingStars widget
19+Row {
23− property alias rating: root.value
21+ property int rating
24− property alias maximumRating: root.maximumValue
22+ property int maximumRating: 5
25− property alias starCount: root.size
23+ property int starCount: 5
24+ height: childrenRect.height
25+ width: childrenRect.width
27+ readonly property int effectiveRating: Math.max(0, Math.min(root.starCount * root.rating / root.maximumRating, root.maximumRating))
30+ model: root.effectiveRating
32+ source: "graphics/icon_star_on.png"
36+ model: root.starCount - root.effectiveRating
38+ source: "graphics/icon_star_off.png"