Krolyxon
Commit ed4e5ea

Branches

Refs →

aurora.configquickshellauroraDotArt.qml

40 lines · 1.3 KB · QML

1import QtQuick
2import QtQuick.Shapes
3
4// A track cover as LED dots in a circle; without a cover, the conical grey gradient from glyph's concept.
5// Ported from glyph-rice (github.com/Nebelung-cloud/glyph-rice, GPL-3.0), components/Art.qml.
6Item {
7 id: root
8
9 property string url
10 property real step: 6
11
12 layer.enabled: true
13 layer.effect: DotMask { step: root.step; circle: true }
14
15 Shape {
16 anchors.fill: parent
17 visible: img.status !== Image.Ready
18 ShapePath {
19 strokeWidth: -1
20 fillGradient: ConicalGradient {
21 centerX: root.width / 2; centerY: root.height / 2; angle: 50
22 GradientStop { position: 0; color: Theme.fg }
23 GradientStop { position: 0.2; color: Theme.mute }
24 GradientStop { position: 0.4; color: Theme.fg }
25 GradientStop { position: 0.6; color: Theme.s1 }
26 GradientStop { position: 0.8; color: Theme.grey }
27 GradientStop { position: 1; color: Theme.fg }
28 }
29 PathRectangle { width: root.width; height: root.height }
30 }
31 }
32 Image {
33 id: img
34 anchors.fill: parent
35 source: root.url
36 fillMode: Image.PreserveAspectCrop
37 sourceSize: Qt.size(256, 256)
38 asynchronous: true
39 }
40}