summaryrefslogtreecommitdiff
path: root/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Widgets/DankBackdrop.qml
blob: 3db7c0c4936f4a1f6dbf96f591bf9ac0adcd24b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import QtQuick
import QtQuick.Effects
import qs.Common

Item {
    id: root

    anchors.fill: parent

    property string screenName: ""
    property bool isColorWallpaper: {
        var currentWallpaper = SessionData.getMonitorWallpaper(screenName)
        return currentWallpaper && currentWallpaper.startsWith("#")
    }

    Rectangle {
        anchors.fill: parent
        color: isColorWallpaper ? SessionData.getMonitorWallpaper(screenName) : Theme.background
    }

    Rectangle {
        x: parent.width * 0.7
        y: -parent.height * 0.3
        width: parent.width * 0.8
        height: parent.height * 1.5
        color: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.15)
        rotation: 35
        visible: !isColorWallpaper
    }

    Rectangle {
        x: parent.width * 0.85
        y: -parent.height * 0.2
        width: parent.width * 0.4
        height: parent.height * 1.2
        color: Qt.rgba(Theme.secondary.r, Theme.secondary.g, Theme.secondary.b, 0.12)
        rotation: 35
        visible: !isColorWallpaper
    }

    Image {
        anchors.left: parent.left
        anchors.bottom: parent.bottom
        anchors.leftMargin: Theme.spacingXL * 2
        anchors.bottomMargin: Theme.spacingXL * 2
        width: 200
        height: width * (569.94629 / 506.50931)
        fillMode: Image.PreserveAspectFit
        smooth: true
        mipmap: true
        asynchronous: true
        source: "file://" + Theme.shellDir + "/assets/danklogonormal.svg"
        opacity: 0.25
        visible: !isColorWallpaper
        layer.enabled: true
        layer.smooth: true
        layer.mipmap: true
        layer.effect: MultiEffect {
            saturation: 0
            colorization: 1
            colorizationColor: Theme.primary
        }
    }
}