Update BG map layout

master
Fabien Freling 2016-08-08 23:11:34 +02:00
parent 3a81d81c2a
commit 6a42bf273a
1 changed files with 46 additions and 22 deletions

View File

@ -4,30 +4,54 @@ Item {
width: 400 width: 400
height: 400 height: 400
Grid { GridView {
id: grid1 id: bgmap_01
x: 0 visible: true
y: 0 smooth: false
width: 256 enabled: false
height: 256 keyNavigationWraps: false
rows: 32 interactive: false
columns: 32 anchors.fill: parent
flickableDirection: Flickable.VerticalFlick
Rectangle { delegate: Item {
id: rectangle1 x: 5
width: 200 height: 50
height: 200 Column {
gradient: Gradient { width: 8
GradientStop { height: 8
position: 0 spacing: 0
color: "#ffffff" Rectangle {
} x: 0
width: 8
GradientStop { height: 8
position: 1 color: colorCode
color: "#000000" border.width: 1
anchors.horizontalCenter: parent.horizontalCenter
} }
} }
} }
cellWidth: 8
model: ListModel {
ListElement {
name: "Grey"
colorCode: "grey"
}
ListElement {
name: "Red"
colorCode: "red"
}
ListElement {
name: "Blue"
colorCode: "blue"
}
ListElement {
name: "Green"
colorCode: "green"
}
}
cellHeight: 8
} }
} }