summaryrefslogtreecommitdiff
path: root/qml/Square.qml
diff options
context:
space:
mode:
Diffstat (limited to 'qml/Square.qml')
-rw-r--r--qml/Square.qml9
1 files changed, 9 insertions, 0 deletions
diff --git a/qml/Square.qml b/qml/Square.qml
index de61de4..f71f3a5 100644
--- a/qml/Square.qml
+++ b/qml/Square.qml
@@ -1,11 +1,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) == 1 ? "#e8ebef" : "#7d8796"
border.color: "yellow"
border.width: 0
MouseArea {
anchors.fill: parent
onClicked: parent.border.width ^= 3
}
+ Image {
+ width: parent.width
+ height: this.width
+ source: image
+ }
}