blob: 6c672eafa5557d1f152c86b6816992b1088741f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<Item id="Container">
<signals>
<Signal name="clicked"/>
</signals>
<properties>
<Property name="text"/>
</properties>
<Image id="Image" source="pics/button.png"/>
<Image id="Pressed" source="pics/button-pressed.png" opacity="0"/>
<MouseRegion id="MouseRegion" anchors.fill="{Image}" onClicked="Container.clicked.emit();"/>
<Text font.bold="true" color="white" anchors.centeredIn="{Image}" text="{Container.text}"/>
<width>{Image.width}</width>
<states>
<State name="Pressed" when="{MouseRegion.pressed == true}">
<SetProperties target="{Pressed}" opacity="1"/>
</State>
</states>
</Item>
|