summaryrefslogtreecommitdiffstats
path: root/demos/declarative/mediabrowser/content/Star.qml
blob: 1db29e8a95b47416f1743ba2409b162470778fb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<Item id="Container" width="24" height="24">
    <properties>
        <Property name="rating"/>
        <Property name="on"/>
    </properties>

    <signals>
        <Signal name="clicked"/>
    </signals>

    <Image id="Image" src="pics/ghns_star.png" x="6" y="7" opacity="0.4" scale="0.5"/>
    <MouseRegion anchors.fill="{Container}" onClicked="Container.clicked.emit()"/>

    <states>
        <State name="on" when="{Container.on == true}">
            <SetProperties target="{Image}" opacity="1" scale="1" x="1" y="0"/>
        </State>
    </states>
    <transitions>
        <Transition>
            <NumericAnimation properties="opacity,scale,x,y" easing="easeOutBounce"/>
        </Transition>
    </transitions>

</Item>