Stretch the wallpaper grid to the full width
This commit is contained in:
1 parent
3cc1299e5b
commit
e3e0c09e72
1 file changed
+4
-3
@@ -43,8 +43,9 @@ Item {
|
|||||||
id: grid
|
id: grid
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
clip: true
|
clip: true
|
||||||
cellWidth: Style.spaceReal(120)
|
readonly property int columnCount: Math.max(1, Math.floor(width / Style.spaceReal(120)))
|
||||||
cellHeight: Style.spaceReal(80)
|
cellWidth: width / columnCount
|
||||||
|
cellHeight: cellWidth * 2 / 3
|
||||||
model: root.wallpapers
|
model: root.wallpapers
|
||||||
|
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
@@ -70,7 +71,7 @@ Item {
|
|||||||
fillMode: Image.PreserveAspectCrop
|
fillMode: Image.PreserveAspectCrop
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
cache: true
|
cache: true
|
||||||
sourceSize.width: Math.round(Style.spaceReal(120) * 1.5)
|
sourceSize.width: Math.round(grid.cellWidth * 1.5)
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|||||||
Reference in new issue
Block a user