18 import Ubuntu.Components 0.1
25 model: styledItem.size
27 property int indexHalfValue: {
28 var integerPart = Math.floor(styledItem.effectiveValue);
29 var fractionalPart = styledItem.effectiveValue - integerPart;
31 if (fractionalPart < 0.5)
return -1;
32 else return integerPart;
34 property url urlIconEmpty: styledItem.urlIconEmpty ||
"graphics/icon_star_empty.png"
35 property url urlIconFull: styledItem.urlIconFull ||
"graphics/icon_star_full.png"
36 property url urlIconHalf: styledItem.urlIconHalf ||
"graphics/icon_star_half.png"
39 opacity: styledItem.value < 0 ? 0.4 : 1
41 if (index === repeater.indexHalfValue)
return repeater.urlIconHalf;
42 else if (index < styledItem.effectiveValue)
return repeater.urlIconFull;
43 else return repeater.urlIconEmpty;