Advertisement
Guest User

Untitled

a guest
Feb 17th, 2018
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. import QtQuick 2.0
  2.  
  3. FocusScope {
  4.  
  5. Rectangle {
  6. id: xboxgrid
  7.  
  8. color: "#272727"
  9. anchors.left: parent.left
  10. anchors.right: parent.right
  11. anchors.top: parent.top
  12. anchors.bottom: parent.bottom
  13. clip: true
  14.  
  15. Component {
  16. id: xboxDelegate
  17. Item {
  18. //width: grid.cellWidth; height: grid.cellHeight
  19. width: vpx(145); height: vpx(216)
  20. Column {
  21. anchors.fill: parent
  22. Image {
  23. id: cover
  24. anchors.top: parent.top
  25. anchors.right: parent.right
  26. anchors.left: parent.left
  27. anchors.bottom: parent.bottom
  28. anchors.bottomMargin: 0
  29.  
  30. fillMode: Image.PreserveAspectCrop
  31. source: assets.banner || assets.steam || assets.boxFront
  32. sourceSize { width: 300; height: 300 }
  33. asynchronous: true
  34. }
  35. Text { text: modelData.title; font.family: "Segoe UI"; font.bold: true; font.pointSize: 14; color:"white" }
  36. }
  37. }
  38. }
  39.  
  40. GridView {
  41. id: grid
  42. anchors.fill: parent
  43. //anchors.margins: vpx(70)
  44. anchors.topMargin: vpx(15)
  45. anchors.leftMargin: vpx(70)
  46. cellWidth: vpx(150); cellHeight: vpx(300)
  47.  
  48. model: api.currentCollection.gameList.model
  49. delegate: xboxDelegate
  50.  
  51. currentIndex: api.collectionList.index
  52. highlight:
  53. Rectangle {
  54. width: cellWidth; height: cellHeight
  55. color: "transparent"
  56. border.color: "white"
  57. border.width: vpx(3)
  58. scale: 1.01
  59. z: 2
  60. }
  61. highlightMoveDuration: 0
  62. focus: true
  63.  
  64. }
  65. }
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement