revert clock minText, hide volume outputs when single device

This commit is contained in:
Damocles 2026-04-16 00:19:06 +02:00
parent 6d3ec188e8
commit 852ba53092
2 changed files with 55 additions and 51 deletions

View file

@ -10,6 +10,5 @@ M.BarLabel {
font.pixelSize: M.Theme.fontSize + 1 font.pixelSize: M.Theme.fontSize + 1
label: Qt.formatDateTime(clock.date, "ddd, dd. MMM HH:mm") label: Qt.formatDateTime(clock.date, "ddd, dd. MMM HH:mm")
minText: "Mi., 00. Sep. 00:00"
tooltip: Qt.formatDateTime(clock.date, "dddd, dd. MMMM yyyy\nHH:mm:ss") tooltip: Qt.formatDateTime(clock.date, "dddd, dd. MMMM yyyy\nHH:mm:ss")
} }

View file

@ -195,65 +195,70 @@ M.BarSection {
id: deviceList id: deviceList
width: parent.width width: parent.width
// Output devices // Output devices only shown when more than one exists
Rectangle { Column {
width: parent.width - 16 visible: root._sinkList.length > 1
height: 1
anchors.horizontalCenter: parent.horizontalCenter
color: M.Theme.base03
}
Text {
width: parent.width width: parent.width
height: 24
verticalAlignment: Text.AlignVCenter
leftPadding: 12
text: "Output Devices"
color: M.Theme.base04
font.pixelSize: M.Theme.fontSize - 1
font.family: M.Theme.fontFamily
}
Repeater { Rectangle {
model: root._sinkList width: parent.width - 16
height: 1
anchors.horizontalCenter: parent.horizontalCenter
color: M.Theme.base03
}
delegate: Item { Text {
required property var modelData width: parent.width
height: 24
verticalAlignment: Text.AlignVCenter
leftPadding: 12
text: "Output Devices"
color: M.Theme.base04
font.pixelSize: M.Theme.fontSize - 1
font.family: M.Theme.fontFamily
}
width: deviceList.width Repeater {
height: 28 model: root._sinkList
readonly property bool _active: modelData === root.sink delegate: Item {
required property var modelData
Rectangle { width: deviceList.width
anchors.fill: parent height: 28
anchors.leftMargin: 4
anchors.rightMargin: 4
color: deviceHover.hovered ? M.Theme.base02 : "transparent"
radius: M.Theme.radius
}
Text { readonly property bool _active: modelData === root.sink
anchors.left: parent.left
anchors.leftMargin: 12
anchors.right: parent.right
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: modelData.description || modelData.name || "Unknown"
color: parent._active ? root.accentColor : M.Theme.base05
font.pixelSize: M.Theme.fontSize
font.family: M.Theme.fontFamily
font.bold: parent._active
elide: Text.ElideRight
}
HoverHandler { Rectangle {
id: deviceHover anchors.fill: parent
cursorShape: Qt.PointingHandCursor anchors.leftMargin: 4
} anchors.rightMargin: 4
color: deviceHover.hovered ? M.Theme.base02 : "transparent"
radius: M.Theme.radius
}
TapHandler { Text {
onTapped: Pipewire.preferredDefaultAudioSink = modelData anchors.left: parent.left
anchors.leftMargin: 12
anchors.right: parent.right
anchors.rightMargin: 12
anchors.verticalCenter: parent.verticalCenter
text: modelData.description || modelData.name || "Unknown"
color: parent._active ? root.accentColor : M.Theme.base05
font.pixelSize: M.Theme.fontSize
font.family: M.Theme.fontFamily
font.bold: parent._active
elide: Text.ElideRight
}
HoverHandler {
id: deviceHover
cursorShape: Qt.PointingHandCursor
}
TapHandler {
onTapped: Pipewire.preferredDefaultAudioSink = modelData
}
} }
} }
} }