Warning, /multimedia/audiotube/src/contents/ui/PlaylistCover.qml is written in an unsupported language. File is not indexed.

0001 // SPDX-FileCopyrightText: 2022 Mathis BrĂ¼chert <mbb@kaidan.im>
0002 //
0003 // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0004 
0005 import QtQuick 2.15
0006 import QtQuick.Window 2.15
0007 import QtQuick.Controls 2.15 as Controls
0008 
0009 import org.kde.kirigami as Kirigami
0010 
0011 Item {
0012     property int radius
0013     property alias source1: image1.source
0014     property alias source2: image2.source
0015     property alias source3: image3.source
0016     property alias source4: image4.source
0017     property string title
0018 
0019     id: icon
0020 
0021     layer {
0022         enabled: true
0023         effect: Kirigami.ShadowedTexture {
0024             id: mask
0025             radius: icon.radius
0026         }
0027     }
0028 
0029     Rectangle{
0030         anchors.fill: parent
0031         color: Qt.rgba(Math.random(),Math.random(),Math.random(),0.4);
0032     }
0033     Image {
0034         id:image1
0035         anchors.top: parent.top
0036         anchors.left: parent.left
0037         width: parent.width/2
0038         height: parent.height/2
0039         fillMode: Image.PreserveAspectCrop
0040         asynchronous: true
0041         sourceSize.width: parent.implicitWidth * Screen.devicePixelRatio
0042         Controls.Label{
0043             z:-1
0044             text: icon.title.charAt(0)
0045             anchors.centerIn: parent
0046             color: "White"
0047             font.pixelSize: 40
0048             font.capitalization: Font.AllUppercase
0049             font.family: "Noto Serif"
0050             font.bold: true
0051             enabled: false
0052 
0053         }
0054     }
0055     Image {
0056         id:image2
0057         anchors.top: parent.top
0058         anchors.right: parent.right
0059         width: parent.width/2
0060         height: parent.height/2
0061         fillMode: Image.PreserveAspectCrop
0062         asynchronous: true
0063         sourceSize.width: parent.implicitWidth * Screen.devicePixelRatio
0064         Controls.Label{
0065             z:-1
0066             text: icon.title.charAt(1)
0067             anchors.centerIn: parent
0068             color: "White"
0069             font.pixelSize: 40
0070             font.capitalization: Font.AllUppercase
0071             font.family: "Noto Serif"
0072             font.bold: true
0073             enabled: false
0074 
0075         }
0076 
0077     }
0078     Image {
0079         id:image3
0080         anchors.bottom: parent.bottom
0081         anchors.left: parent.left
0082         width: parent.width/2
0083         height: parent.height/2
0084         fillMode: Image.PreserveAspectCrop
0085         asynchronous: true
0086         sourceSize.width: parent.implicitWidth * Screen.devicePixelRatio
0087         Controls.Label{
0088             z:-1
0089             text: icon.title.charAt(2)
0090             anchors.centerIn: parent
0091             color: "White"
0092             font.pixelSize: 40
0093             font.capitalization: Font.AllUppercase
0094             font.family: "Noto Serif"
0095             font.bold: true
0096             enabled: false
0097 
0098         }
0099 
0100     }
0101     Image {
0102         id:image4
0103         anchors.bottom: parent.bottom
0104         anchors.right: parent.right
0105         width: parent.width/2
0106         height: parent.height/2
0107         fillMode: Image.PreserveAspectCrop
0108         asynchronous: true
0109         sourceSize.width: parent.implicitWidth * Screen.devicePixelRatio
0110         Controls.Label{
0111             z:-1
0112             text: icon.title.charAt(3)
0113             anchors.centerIn: parent
0114             color: "White"
0115             font.pixelSize: 40
0116             font.capitalization: Font.AllUppercase
0117             font.family: "Noto Serif"
0118             font.bold: true
0119             enabled: false
0120 
0121         }
0122     }
0123 
0124 
0125 
0126     Rectangle {
0127         id: mask
0128         anchors.fill: parent
0129         visible: false
0130     }
0131 }
0132