Advertisement
Guest User

Untitled

a guest
Mar 18th, 2018
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.00 KB | None | 0 0
  1. //////////////SWITCH SETTINGS
  2.  
  3. Rectangle {
  4. id: switchsettings
  5.  
  6. color: "#ebebeb"
  7.  
  8. anchors.left: parent.left
  9. anchors.right: parent.right
  10. anchors.top: switchgamelist.bottom
  11. anchors.bottom: parent.bottom
  12. height: parent.height*0.2
  13.  
  14.  
  15.  
  16. Item{
  17. anchors.fill : parent
  18.  
  19.  
  20. ListView {
  21. id: systemAxis
  22.  
  23. anchors.fill: parent
  24. clip: true
  25.  
  26. orientation: ListView.Horizontal
  27.  
  28. model: 5
  29. delegate: systemAxisDelegate
  30. spacing: vpx(10)
  31.  
  32. snapMode: ListView.SnapOneItem
  33. highlightRangeMode: ListView.StrictlyEnforceRange
  34. highlightMoveDuration: 0
  35.  
  36. highlight:
  37. Rectangle {
  38. color: "transparent"
  39. border.color: systemAxis.activeFocus ? "#4ff0de" : "transparent"
  40. border.width: vpx(6)
  41. scale: 1.1
  42. radius: parent.width*0.5
  43. y: 20
  44. z: 2
  45. }
  46.  
  47. preferredHighlightBegin: vpx(100)
  48. preferredHighlightEnd: preferredHighlightBegin + vpx(1130)
  49. Keys.onUpPressed: gameAxis.forceActiveFocus()
  50.  
  51. focus: true
  52.  
  53. } }
  54.  
  55.  
  56. Component {
  57. id: systemAxisDelegate
  58.  
  59. Rectangle {
  60. id: switchsystem
  61. width: vpx(90)
  62. height: vpx(90)
  63. color: "white"
  64. radius: width*0.5
  65. clip: true
  66. y: 20
  67. border.color: "#e3e3e3"
  68. border.width: vpx(2)
  69.  
  70. Column {
  71. anchors.fill: parent
  72. Image {
  73. id: systemicons
  74. anchors.left: parent.left
  75. anchors.right: parent.right
  76. anchors.top: parent.top
  77. anchors.bottom: parent.bottom
  78.  
  79. fillMode: Image.PreserveAspectCrop
  80. source: assets.banner || assets.steam || assets.boxFront
  81. sourceSize { width: 300; height: 300 }
  82. asynchronous: true
  83.  
  84. }
  85. }
  86.  
  87.  
  88. }
  89. }
  90.  
  91.  
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement