volume: always show device list, remove chevron/expand toggle
This commit is contained in:
parent
8bee713fd3
commit
751d875cad
1 changed files with 1 additions and 44 deletions
|
|
@ -38,14 +38,10 @@ M.BarSection {
|
||||||
return streams;
|
return streams;
|
||||||
}
|
}
|
||||||
|
|
||||||
property bool _expanded: false
|
|
||||||
property bool _osdActive: false
|
property bool _osdActive: false
|
||||||
readonly property bool _anyHover: root._hovered || hoverPanel.panelHovered
|
readonly property bool _anyHover: root._hovered || hoverPanel.panelHovered
|
||||||
readonly property bool _showPanel: _anyHover || _osdActive
|
readonly property bool _showPanel: _anyHover || _osdActive
|
||||||
|
|
||||||
on_ShowPanelChanged: if (!_showPanel)
|
|
||||||
_expanded = false
|
|
||||||
|
|
||||||
onVolumeChanged: _flashPanel()
|
onVolumeChanged: _flashPanel()
|
||||||
onMutedChanged: _flashPanel()
|
onMutedChanged: _flashPanel()
|
||||||
|
|
||||||
|
|
@ -180,46 +176,10 @@ M.BarSection {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sink name + chevron
|
|
||||||
Item {
|
|
||||||
width: parent.width
|
|
||||||
height: 22
|
|
||||||
|
|
||||||
Text {
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: chevron.left
|
|
||||||
anchors.leftMargin: 12
|
|
||||||
anchors.rightMargin: 4
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
text: root.sink?.description ?? root.sink?.name ?? ""
|
|
||||||
color: M.Theme.base04
|
|
||||||
font.pixelSize: M.Theme.fontSize - 2
|
|
||||||
font.family: M.Theme.fontFamily
|
|
||||||
elide: Text.ElideRight
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
id: chevron
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.rightMargin: 12
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
text: root._expanded ? "\uF077" : "\uF078"
|
|
||||||
color: M.Theme.base04
|
|
||||||
font.pixelSize: M.Theme.fontSize - 3
|
|
||||||
font.family: M.Theme.iconFontFamily
|
|
||||||
}
|
|
||||||
|
|
||||||
TapHandler {
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onTapped: root._expanded = !root._expanded
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Device + stream list
|
// Device + stream list
|
||||||
Column {
|
Column {
|
||||||
id: deviceList
|
id: deviceList
|
||||||
width: parent.width
|
width: parent.width
|
||||||
visible: root._expanded
|
|
||||||
|
|
||||||
// Output devices
|
// Output devices
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
@ -279,10 +239,7 @@ M.BarSection {
|
||||||
}
|
}
|
||||||
|
|
||||||
TapHandler {
|
TapHandler {
|
||||||
onTapped: {
|
onTapped: Pipewire.preferredDefaultAudioSink = modelData
|
||||||
Pipewire.preferredDefaultAudioSink = modelData;
|
|
||||||
root._expanded = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue