1
0
Fork 0

Launcher: tweak alignment of thumbnails

If the thumbnail is less than 172px wide, centre in the available
space. This ensures consistent alignment of the main content (name
and aircraft description)
This commit is contained in:
James Turner 2018-09-27 15:23:14 +01:00
parent 54ba92afd8
commit 22bf5eb6e5

View file

@ -43,24 +43,24 @@ Item {
}
}
Rectangle {
Item {
id: thumbnailBox
// thumbnail border
width: 172
height: 128
y: Math.max(0, Math.round((contentBox.childrenRect.height - height) * 0.5))
Rectangle {
anchors.centerIn: parent
border.width: 1
border.color: "#7f7f7f"
width: thumbnail.width
height: thumbnail.height
border.width: 1
border.color: "#7f7f7f"
width: thumbnail.width
height: thumbnail.height
ThumbnailImage {
id: thumbnail
aircraftUri: model.uri
maximumSize.width: 172
maximumSize.height: 128
ThumbnailImage {
id: thumbnail
aircraftUri: model.uri
maximumSize.width: 172
maximumSize.height: 128
}
}
}