50 lines
1 KiB
QML
50 lines
1 KiB
QML
pragma ComponentBehavior: Bound
|
|
import Quickshell
|
|
import Quickshell.Io
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
import Quickshell.WindowManager
|
|
import qs
|
|
|
|
Rectangle {
|
|
id: root
|
|
color: Appearance.colAppBg
|
|
RowLayout {
|
|
id: wsNumLayout
|
|
anchors.centerIn: parent
|
|
spacing: 2
|
|
Repeater {
|
|
id: wsNumRepeater
|
|
model: WindowManager.windowsets
|
|
Rectangle {
|
|
required property var modelData
|
|
function isOverview() {
|
|
if (modelData.name == "overview") {
|
|
return 85 + Appearance.appletRadHeight;
|
|
}
|
|
else {
|
|
return Appearance.appletRadHeight;
|
|
}
|
|
}
|
|
id: wsNum
|
|
implicitWidth: isOverview()
|
|
implicitHeight: Appearance.appletRadHeight
|
|
color: Appearance.colAppBg
|
|
radius: Appearance.appletRadHeight
|
|
visible: modelData.shouldDisplay
|
|
Text {
|
|
id: wsText
|
|
anchors.centerIn: parent
|
|
text: modelData.name
|
|
color: Appearance.colFg
|
|
opacity: modelData.active ? 1 : 0.3
|
|
font {
|
|
family: Appearance.font
|
|
pixelSize: Appearance.fontSize
|
|
bold: true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|