Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 2.8
- import QtGraphicalEffects 1.12
- import QtQuick.Layouts 1.3
- import QtQuick.Controls 2.5
- Rectangle {
- id: rect
- anchors.fill: parent
- color: "#1e1f24"
- GridView {
- id: gridView
- model: albumModel
- cellWidth: 205
- cellHeight: 260
- anchors.fill: parent
- //Calculate margin size
- property int columnCount: Math.floor(rect.width / 215)
- property int extraSpace: rect.width-(columnCount*215)
- property int extraSpacePerMargin: extraSpace/2
- leftMargin: extraSpacePerMargin+30
- //Scrollbar
- ScrollBar.vertical: ScrollBar {
- id: scrollBar
- }
- delegate: Item{
- width: gridView.cellWidth-25;
- height: gridView.cellHeight-50;
- ColumnLayout {
- anchors.fill: parent
- spacing: 5
- Image {
- id: img
- width:180
- height:180
- source: "/run/media/pwn0si/LIBRARY/Music/Guns N' Roses/Guns N's Roses - Singles/folder.jpg"
- //source: "image://"+title+"/1"
- smooth: true
- visible: false
- }
- GaussianBlur {
- anchors.fill: img
- source: img
- radius: 3
- samples: 16
- }
- Text {
- text: title
- color: "#eeeef2"
- font.bold: true
- font.pointSize: 10
- Layout.fillWidth: true
- wrapMode: Text.WordWrap
- }
- Text {
- text: artist;
- color: "#eeeef2"
- font.pointSize: 10
- wrapMode: Text.WordWrap
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement