nixnew/modules/user/modules/quickshell/shell/Bar.qml

73 lines
1 KiB
QML

import QtQuick
import QtQuick.Layouts
import Quickshell
import Quickshell.Wayland
PanelWindow {
id: root
PersistentProperties {
id: persist
reloadableId: "persist"
property bool barVisible: false
}
PopupSurface {
id: popupSurface
reloadableId: "popupSurface"
screen: root.screen
bar: barRect
visible: persist.barVisible
}
onBackingWindowVisibleChanged: {
persist.barVisible = Qt.binding(() => backingWindowVisible);
}
anchors {
left: true
top: true
bottom: true
}
width: 70
color: "transparent"
WlrLayershell.namespace: "shell:bar"
Rectangle {
id: barRect
anchors {
fill: parent
margins: 10
rightMargin: 5
}
color: ShellGlobals.colors.bar
radius: 5
border.color: ShellGlobals.colors.barOutline
border.width: 1
Item {
anchors {
fill: parent
margins: 5
}
ColumnLayout {
anchors {
bottom: parent.bottom
left: parent.left
right: parent.right
}
ClockWidget {
Layout.fillWidth: true
popupSurface: popupSurface
barWindow: root
}
}
}
}
}