summaryrefslogtreecommitdiff
path: root/qml/Square.qml
blob: 78b7a5dd10a4b8b05edc66b231c3256017220da9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import QtQuick 2.0

Rectangle {
    property int i: 0
    property string image: ""
    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: parent.border.width ^= parseInt(0.1 * parent.width)
    }
    Image {
        sourceSize.width: parent.width
        sourceSize.height: parent.height
        source: image
    }
}