summaryrefslogtreecommitdiff
path: root/modules/detachedcontent/DetachedContent.qml
blob: ab4b4ef1b90aab1ee8f4391a15bdf90a6dbc3da1 (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
pragma ComponentBehavior: Bound

import qs.widgets
import qs.services
import qs.config
import Quickshell
import QtQuick
import QtQuick.Layouts
import QtQuick.Effects

Item {
    id: root

    required property ShellScreen screen
    property alias active: session.active
    readonly property Session session: Session {
        id: session
    }

    implicitWidth: implicitHeight * Config.dcontent.sizes.ratio
    implicitHeight: screen.height * Config.dcontent.sizes.heightMult

    RowLayout {
        anchors.fill: parent

        spacing: 0

        StyledRect {
            Layout.fillHeight: true

            topLeftRadius: Appearance.rounding.normal
            bottomLeftRadius: Appearance.rounding.normal
            implicitWidth: navRail.implicitWidth
            color: Colours.palette.m3surfaceContainer

            NavRail {
                id: navRail

                session: root.session
            }
        }

        Item {
            Layout.fillWidth: true
            Layout.fillHeight: true

            StyledText {
                anchors.centerIn: parent
                text: qsTr("Work in progress")
                color: Colours.palette.m3outline
                font.pointSize: Appearance.font.size.extraLarge
                font.weight: 500
            }

            StyledRect {
                anchors.fill: parent
                color: Colours.palette.m3surfaceContainer
                topRightRadius: Appearance.rounding.normal
                bottomRightRadius: Appearance.rounding.normal

                layer.enabled: true
                layer.effect: MultiEffect {
                    maskSource: mask
                    maskEnabled: true
                    maskInverted: true
                    maskThresholdMin: 0.5
                    maskSpreadAtMin: 1
                }
            }

            Item {
                id: mask

                anchors.fill: parent
                layer.enabled: true
                visible: false

                Rectangle {
                    anchors.fill: parent
                    anchors.margins: Appearance.padding.normal
                    anchors.leftMargin: 0
                    radius: Appearance.rounding.small
                }
            }
        }
    }
}