Warning, /maui/index-fm/src/widgets/views/home/Card.qml is written in an unsupported language. File is not indexed.

0001 import QtQuick 2.14
0002 import QtQuick.Controls 2.14
0003 
0004 import org.mauikit.controls 1.2 as Maui
0005 
0006 import QtGraphicalEffects 1.0
0007 
0008 Maui.ListBrowserDelegate
0009 {
0010     id: control
0011 
0012 //    template.headerSizeHint: iconSizeHint + Maui.Style.space.small
0013 
0014     label1.font.pointSize: Maui.Style.fontSizes.big
0015     label1.font.weight: Font.Bold
0016     label1.font.bold: true
0017 
0018     background: Rectangle
0019     {
0020         radius: Maui.Style.radiusV
0021         color: Qt.tint(control.Maui.Theme.textColor, Qt.rgba(control.Maui.Theme.backgroundColor.r, control.Maui.Theme.backgroundColor.g, control.Maui.Theme.backgroundColor.b, 0.9))
0022 
0023         Rectangle
0024         {
0025             id: _iconRec
0026             opacity: 0.3
0027             anchors.fill: parent
0028             color: Maui.Theme.backgroundColor
0029             clip: true
0030 
0031             FastBlur
0032             {
0033                 id: fastBlur
0034                 height: parent.height * 2
0035                 width: parent.width * 2
0036                 anchors.centerIn: parent
0037                 source: control.template.iconItem
0038                 radius: 64
0039                 transparentBorder: true
0040                 cached: true
0041             }
0042 
0043             Rectangle
0044             {
0045                 anchors.fill: parent
0046                 opacity: 0.5
0047                 color: Qt.tint(control.Maui.Theme.textColor, Qt.rgba(control.Maui.Theme.backgroundColor.r, control.Maui.Theme.backgroundColor.g, control.Maui.Theme.backgroundColor.b, 0.9))
0048             }
0049         }
0050 
0051         OpacityMask
0052         {
0053             source: mask
0054             maskSource: _iconRec
0055         }
0056 
0057         LinearGradient
0058         {
0059             id: mask
0060             anchors.fill: parent
0061             gradient: Gradient {
0062                 GradientStop { position: 0.2; color: "transparent"}
0063                 GradientStop { position: 0.5; color: control.background.color}
0064             }
0065 
0066             start: Qt.point(0, 0)
0067             end: Qt.point(_iconRec.width, _iconRec.height)
0068         }
0069     }
0070 
0071     layer.enabled: true
0072     layer.effect: OpacityMask
0073     {
0074         maskSource: Item
0075         {
0076             width: control.width
0077             height: control.height
0078 
0079             Rectangle
0080             {
0081                 anchors.fill: parent
0082                 radius: Maui.Style.radiusV
0083             }
0084         }
0085     }
0086 
0087 }