summaryrefslogtreecommitdiff
path: root/modules/bar/Bar.qml
blob: 7608d4966cbb5c3859ae14bbb70532a319201485 (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
import "root:/widgets"
import "root:/config"
import "components"
import "components/workspaces"
import Quickshell
import Quickshell.Wayland
import QtQuick
import QtQuick.Controls

Variants {
    model: Quickshell.screens

    StyledWindow {
        id: win

        required property ShellScreen modelData

        screen: modelData
        name: "bar"

        width: BarConfig.vertical ? BarConfig.preset.totalHeight : -1
        height: BarConfig.vertical ? -1 : BarConfig.preset.totalHeight

        anchors.top: true
        anchors.left: true
        anchors.right: true

        // Connections {
        //     target: BarConfig

        //     function onVerticalChanged(): void {
        //         win.visible = false;
        //         if (BarConfig.vertical) {
        //             win.anchors.right = false;
        //             win.anchors.bottom = true;
        //         } else {
        //             win.anchors.bottom = false;
        //             win.anchors.right = true;
        //         }
        //         win.visible = true;
        //     }
        // }

        SwipeView {
            anchors.fill: parent
            currentIndex: 1

            Pills {}
        }
    }
}