2
* This file is part of unity-2d
4
* Copyright 2010-2011 Canonical Ltd.
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; version 3.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
23
/* Fill is between 0 and 1 */
25
property int iconSize: 32
26
property bool selected: false
28
width: childrenRect.width
29
height: childrenRect.height
39
width: sourceSize.width
40
height: sourceSize.height
42
source: ("artwork/star_empty-%1.png").arg(iconSize)
43
opacity: ( selected ) ? 0.8 : 0.3
48
width: Math.ceil(sourceSize.width * fill)
49
height: sourceSize.height
51
source: ("artwork/star_full-%1.png").arg(iconSize)
52
fillMode: Image.TileHorizontally
54
opacity: ( selected ) ? 1 : 0.8