aboutsummaryrefslogtreecommitdiffstats
path: root/home/quickshell/bar/blocks/Workspace.qml
blob: 232a3f33e9c58c06f2bb1cdf97a9b02321fe219b (plain) (blame)
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
import QtQuick
import QtQuick.Layouts

Rectangle {
    id: ws

    property bool hovered: false

    Layout.preferredWidth: 10
    Layout.preferredHeight: 10
    Layout.minimumWidth: 10
    Layout.minimumHeight: 10
    Layout.alignment: Qt.AlignHCenter
    radius: height / 2

    MouseArea {
        anchors.fill: parent
        hoverEnabled: true

        onEntered: () => {
            ws.hovered = true;
        }
        onExited: () => {
            ws.hovered = false;
        }
        onClicked: () => console.log(`workspace ?`)
    }
}