Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import QtQuick 2.8
  2. import QtGraphicalEffects 1.12
  3. import QtQuick.Layouts 1.3
  4. import QtQuick.Controls 2.5
  5.  
  6. Rectangle {
  7. id: rect
  8.  
  9. anchors.fill: parent
  10. color: "#1e1f24"
  11.  
  12. GridView {
  13.  
  14. id: gridView
  15. model: albumModel
  16.  
  17. cellWidth: 205
  18. cellHeight: 260
  19. anchors.fill: parent
  20.  
  21. //Calculate margin size
  22. property int columnCount: Math.floor(rect.width / 215)
  23. property int extraSpace: rect.width-(columnCount*215)
  24. property int extraSpacePerMargin: extraSpace/2
  25. leftMargin: extraSpacePerMargin+30
  26.  
  27. //Scrollbar
  28. ScrollBar.vertical: ScrollBar {
  29. id: scrollBar
  30. }
  31.  
  32. delegate: Item{
  33. width: gridView.cellWidth-25;
  34. height: gridView.cellHeight-50;
  35.  
  36. ColumnLayout {
  37.  
  38. anchors.fill: parent
  39. spacing: 5
  40.  
  41. Image {
  42. id: img
  43. width:180
  44. height:180
  45. source: "/run/media/pwn0si/LIBRARY/Music/Guns N' Roses/Guns N's Roses - Singles/folder.jpg"
  46. //source: "image://"+title+"/1"
  47. smooth: true
  48. visible: false
  49. }
  50.  
  51. GaussianBlur {
  52. anchors.fill: img
  53. source: img
  54. radius: 3
  55. samples: 16
  56. }
  57.  
  58. Text {
  59. text: title
  60. color: "#eeeef2"
  61. font.bold: true
  62. font.pointSize: 10
  63. Layout.fillWidth: true
  64. wrapMode: Text.WordWrap
  65. }
  66.  
  67. Text {
  68. text: artist;
  69. color: "#eeeef2"
  70. font.pointSize: 10
  71. wrapMode: Text.WordWrap
  72. }
  73. }
  74. }
  75. }
  76. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement