blob: bb13184d53f120bf6fa4e33d35662f9f4fbb5503 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import QtQuick 2.2
Rectangle {
property int i: 0
property string piece: ""
property string image: piece !== "" ? "qrc:///images/" + piece + ".svg" : ""
width: page.width / 8
height: this.width
color: ((i >> 3 ^ i) & 1) == 0 ? "#e8ebef" : "#7d8796"
border.color: "yellow"
border.width: 0
MouseArea {
anchors.fill: parent
onClicked: functions.select(i);
}
Image {
id: piece_image
sourceSize.width: parent.width
sourceSize.height: parent.height
source: image
}
}
|