58 lines
1.1 KiB
QML
58 lines
1.1 KiB
QML
|
pragma ComponentBehavior: Bound
|
||
|
import QtQuick
|
||
|
import QtQuick.Layouts
|
||
|
import Quickshell
|
||
|
|
||
|
import "../../config"
|
||
|
import "components"
|
||
|
|
||
|
Rectangle {
|
||
|
id: root
|
||
|
|
||
|
color: Config.bar.colors.bar
|
||
|
|
||
|
required property ShellScreen screen
|
||
|
|
||
|
anchors {
|
||
|
top: parent.top
|
||
|
bottom: parent.bottom
|
||
|
left: parent.left
|
||
|
}
|
||
|
|
||
|
implicitWidth: Config.bar.width
|
||
|
|
||
|
Item {
|
||
|
id: child
|
||
|
|
||
|
anchors {
|
||
|
top: parent.top
|
||
|
bottom: parent.bottom
|
||
|
horizontalCenter: parent.horizontalCenter
|
||
|
}
|
||
|
|
||
|
implicitWidth: Math.max(clock.implicitWidth, workspaces.implicitWidth)
|
||
|
|
||
|
ColumnLayout {
|
||
|
spacing: 2
|
||
|
anchors {
|
||
|
top: parent.top
|
||
|
left: parent.left
|
||
|
right: parent.right
|
||
|
margins: 0
|
||
|
}
|
||
|
Clock {
|
||
|
id: clock
|
||
|
}
|
||
|
Workspaces {
|
||
|
id: workspaces
|
||
|
screen: root.screen
|
||
|
}
|
||
|
}
|
||
|
|
||
|
Text {
|
||
|
text: root.screen.name
|
||
|
color: "green"
|
||
|
}
|
||
|
}
|
||
|
}
|