quickshell/modules/bar/Bar.qml
2026-05-14 19:47:31 +02:00

67 lines
1.7 KiB
QML

import QtQuick
import QtQuick.Layouts
import Quickshell
import qs
import qs.settings
Variants {
model: Quickshell.screens
delegate: PanelWindow {
id: root
required property var modelData
screen: modelData
anchors {
top: true
left: true
right: true
}
implicitHeight: Config.barHeight
color: Colors.base00
RowLayout {
id: leftLayout
spacing: 5
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: 10
Ws {
barScreen: root.modelData
barHeight: root.implicitHeight
}
ActiveWindow {
vertMargin: barHeight / 4 - 4
barHeight: root.implicitHeight
Layout.maximumWidth: 300
Layout.maximumHeight: barHeight - (barHeight / 4 + 2)
Layout.fillWidth: false
}
}
RowLayout {
id: centerLayout
anchors.centerIn: parent
spacing: 5
Clock {
vertMargin: barHeight / 4 - 4
barHeight: root.implicitHeight
}
}
RowLayout {
id: rightLayout
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
spacing: 5
anchors.rightMargin: 10
Mpris {
barHeight: root.implicitHeight
}
Pw {
barHeight: root.implicitHeight
}
Tray {
barHeight: root.implicitHeight
}
}
}
}