Watch
1
0
Fork
You've already forked souveraine
0
souveraine/surfaces/quickshell/modules/ii/sidebarRight/volumeMixer/VolumeDialogContent.qml
Fimeg 72b01457d2 quickshell: restore ii-stock config keys the fork dropped
Config.qml regained sidebar.width/widthExtended (their absence collapsed
the right sidebar PanelWindow to 1px — 'unclickable' on the laptop), plus
lock.dpmsTimeout, lock.unlockHook, and autoIdleInhibit with its Idle.qml
property. Audio.qml's absent capture source is now a zero-volume stub so
stock consumers stop dereferencing null, and the pactl status parse runs
under LC_ALL=C. volumeMixer dialog content comes along for the sidebar.
Findings logged in SouveraineOS/docs/DUMP-power-idle-lock-2026-07-15.md.
2026-07-16 08:06:11 -04:00

83 lines
3 KiB
QML

import qs.services
import qs.modules.common
import qs.modules.common.widgets
import QtQuick
import QtQuick.Layouts
// Native PulseAudio has one verified board endpoint today: the UCM Speaker
// route published as alsa_output.hw_0_0. ii's original dialog only renders
// PipeWire nodes, so it presented an empty application list as though no
// device existed. Keep the device state explicit until capture and alternate
// routes are real PulseAudio endpoints.
ColumnLayout {
id: root
required property bool isSink
readonly property bool outputAvailable: Audio.ready && Audio.sink?.name.length > 0
readonly property bool inputAvailable: Audio.source?.audio !== undefined && Audio.source?.audio !== null
spacing: 16
Rectangle {
Layout.fillWidth: true
Layout.preferredHeight: deviceRow.implicitHeight + 24
radius: Appearance.rounding.small
color: Appearance.colors.colLayer2
RowLayout {
id: deviceRow
anchors.fill: parent
anchors.margins: 12
spacing: 12
MaterialSymbol {
text: root.isSink ? "speaker" : "mic"
iconSize: Appearance.font.pixelSize.hugeass
color: Appearance.colors.colOnLayer2
}
ColumnLayout {
Layout.fillWidth: true
spacing: 2
StyledText {
Layout.fillWidth: true
elide: Text.ElideRight
font.pixelSize: Appearance.font.pixelSize.normal
color: Appearance.colors.colOnLayer2
text: root.isSink
? (root.outputAvailable ? Audio.friendlyDeviceName(Audio.sink) : Translation.tr("Connecting to PulseAudio…"))
: (root.inputAvailable ? Audio.friendlyDeviceName(Audio.source) : Translation.tr("No microphone source yet"))
}
StyledText {
Layout.fillWidth: true
wrapMode: Text.Wrap
font.pixelSize: Appearance.font.pixelSize.smaller
color: Appearance.m3colors.m3outline
text: root.isSink
? Translation.tr("Default output • Pixel 3 internal stereo speakers")
: Translation.tr("The handset DMIC route is still under capture validation")
}
}
}
}
StyledSlider {
Layout.fillWidth: true
visible: root.isSink && root.outputAvailable
value: Audio.sink?.audio?.volume ?? 0
onMoved: Audio.sink.audio.volume = value
configuration: StyledSlider.Configuration.M
}
StyledText {
Layout.fillWidth: true
visible: root.isSink && root.outputAvailable
horizontalAlignment: Text.AlignHCenter
color: Appearance.colors.colSubtext
text: Audio.sink?.audio?.muted
? Translation.tr("Muted")
: `${Math.round((Audio.sink?.audio?.volume ?? 0) * 100)}%`
}
Item { Layout.fillHeight: true }
}