left-to-right layout in favorites grid

This commit is contained in:
Alexander Ivash 2018-04-27 22:32:19 +03:00
parent 10e5f03f5e
commit bdacd1b792

View file

@ -333,7 +333,7 @@ Rectangle {
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 30 anchors.leftMargin: 30
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: 30 anchors.rightMargin: 0
anchors.top: favoritesLabel.bottom anchors.top: favoritesLabel.bottom
anchors.topMargin: 9 anchors.topMargin: 9
@ -345,6 +345,8 @@ Rectangle {
interactive: false; interactive: false;
currentIndex: (selectedAvatarId !== '' && !pageOfAvatars.isUpdating) ? pageOfAvatars.findAvatar(selectedAvatarId) : -1 currentIndex: (selectedAvatarId !== '' && !pageOfAvatars.isUpdating) ? pageOfAvatars.findAvatar(selectedAvatarId) : -1
property int horizontalSpacing: 18
property int verticalSpacing: 36
AvatarsModel { AvatarsModel {
id: allAvatars id: allAvatars
@ -441,10 +443,10 @@ Rectangle {
} }
} }
flow: GridView.FlowTopToBottom flow: GridView.FlowLeftToRight
cellHeight: 92 + 36 cellHeight: 92 + verticalSpacing
cellWidth: 92 + 18 cellWidth: 92 + horizontalSpacing
delegate: Item { delegate: Item {
id: delegateRoot id: delegateRoot