Commit d25c39c7 authored by Camilo Higuita's avatar Camilo Higuita

fixes

parent cadd0ddd
......@@ -21,7 +21,7 @@ Pane
{
id: grid
width: parent.width
width: Math.min(model.count, Math.floor(parent.width/cellWidth))*cellWidth
height: parent.height
anchors.horizontalCenter: parent.horizontalCenter
......@@ -41,17 +41,17 @@ Pane
// radius: borderRadius
// }
onWidthChanged:
{
var amount = parseInt(grid.width/(albumSize+albumSpacing),10)
var leftSpace = parseInt(grid.width-(amount*albumSize), 10)
var size = parseInt(albumSize+(parseInt(leftSpace/amount, 10)), 10)
// onWidthChanged:
// {
// var amount = parseInt(grid.width/(albumSize+albumSpacing),10)
// var leftSpace = parseInt(grid.width-(amount*albumSize), 10)
// var size = parseInt(albumSize+(parseInt(leftSpace/amount, 10)), 10)
size = size > albumSize+albumSpacing ? size : albumSize+albumSpacing
// size = size > albumSize+albumSpacing ? size : albumSize+albumSpacing
grid.cellWidth = size
// grid.cellHeight = size
}
// grid.cellWidth = size
// // grid.cellHeight = size
// }
delegate: BabeAlbum
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment