Compare commits
2 commits
bcaabd5120
...
f46b7d6c55
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f46b7d6c55 | ||
|
|
b72ca67198 |
3 changed files with 25 additions and 25 deletions
|
|
@ -171,7 +171,6 @@ PanelWindow {
|
||||||
}
|
}
|
||||||
M.Volume {
|
M.Volume {
|
||||||
visible: M.Modules.volume.enable
|
visible: M.Modules.volume.enable
|
||||||
bar: bar
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,12 +45,14 @@ PanelWindow {
|
||||||
WlrLayershell.exclusiveZone: 0
|
WlrLayershell.exclusiveZone: 0
|
||||||
WlrLayershell.namespace: root.panelNamespace
|
WlrLayershell.namespace: root.panelNamespace
|
||||||
|
|
||||||
|
property real topMargin: 0
|
||||||
|
|
||||||
anchors.top: true
|
anchors.top: true
|
||||||
anchors.left: true
|
anchors.left: true
|
||||||
anchors.right: true
|
anchors.right: true
|
||||||
anchors.bottom: true
|
anchors.bottom: true
|
||||||
|
|
||||||
margins.top: 0
|
margins.top: topMargin
|
||||||
|
|
||||||
function _updatePosition() {
|
function _updatePosition() {
|
||||||
const scr = screen;
|
const scr = screen;
|
||||||
|
|
|
||||||
|
|
@ -38,9 +38,13 @@ 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 || _expanded || _osdActive
|
||||||
|
|
||||||
|
on_ShowPanelChanged: if (!_showPanel)
|
||||||
|
_expanded = false
|
||||||
|
|
||||||
onVolumeChanged: _flashPanel()
|
onVolumeChanged: _flashPanel()
|
||||||
onMutedChanged: _flashPanel()
|
onMutedChanged: _flashPanel()
|
||||||
|
|
@ -56,8 +60,6 @@ M.BarSection {
|
||||||
onTriggered: root._osdActive = false
|
onTriggered: root._osdActive = false
|
||||||
}
|
}
|
||||||
|
|
||||||
required property var bar
|
|
||||||
|
|
||||||
M.BarIcon {
|
M.BarIcon {
|
||||||
icon: root._volumeIcon
|
icon: root._volumeIcon
|
||||||
minIcon: "\uF028"
|
minIcon: "\uF028"
|
||||||
|
|
@ -91,7 +93,6 @@ M.BarSection {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// OSD panel — hover shows slider only, fixed height, no resize
|
|
||||||
M.HoverPanel {
|
M.HoverPanel {
|
||||||
id: hoverPanel
|
id: hoverPanel
|
||||||
showPanel: root._showPanel
|
showPanel: root._showPanel
|
||||||
|
|
@ -179,7 +180,7 @@ M.BarSection {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sink name row — click chevron to open mixer popup
|
// Sink name + chevron
|
||||||
Item {
|
Item {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 22
|
height: 22
|
||||||
|
|
@ -202,7 +203,7 @@ M.BarSection {
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: 12
|
anchors.rightMargin: 12
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
text: "\uF078"
|
text: root._expanded ? "\uF077" : "\uF078"
|
||||||
color: M.Theme.base04
|
color: M.Theme.base04
|
||||||
font.pixelSize: M.Theme.fontSize - 3
|
font.pixelSize: M.Theme.fontSize - 3
|
||||||
font.family: M.Theme.iconFontFamily
|
font.family: M.Theme.iconFontFamily
|
||||||
|
|
@ -210,23 +211,15 @@ M.BarSection {
|
||||||
|
|
||||||
TapHandler {
|
TapHandler {
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
onTapped: mixerLoader.active = true
|
onTapped: root._expanded = !root._expanded
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Mixer popup — separate window, no resize issues
|
// Device + stream list
|
||||||
LazyLoader {
|
Column {
|
||||||
id: mixerLoader
|
id: deviceList
|
||||||
active: false
|
width: parent.width
|
||||||
|
visible: root._expanded
|
||||||
M.HoverPanel {
|
|
||||||
popupMode: true
|
|
||||||
accentColor: root.accentColor
|
|
||||||
screen: root.bar.screen
|
|
||||||
anchorX: root.mapToGlobal(root.width / 2, 0).x - (root.bar.screen?.x ?? 0)
|
|
||||||
contentWidth: 220
|
|
||||||
onDismissed: mixerLoader.active = false
|
|
||||||
|
|
||||||
// Output devices
|
// Output devices
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
@ -253,7 +246,7 @@ M.BarSection {
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
required property var modelData
|
required property var modelData
|
||||||
|
|
||||||
width: 220
|
width: deviceList.width
|
||||||
height: 28
|
height: 28
|
||||||
|
|
||||||
readonly property bool _active: modelData === root.sink
|
readonly property bool _active: modelData === root.sink
|
||||||
|
|
@ -288,7 +281,7 @@ M.BarSection {
|
||||||
TapHandler {
|
TapHandler {
|
||||||
onTapped: {
|
onTapped: {
|
||||||
Pipewire.preferredDefaultAudioSink = modelData;
|
Pipewire.preferredDefaultAudioSink = modelData;
|
||||||
mixerLoader.active = false;
|
root._expanded = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -322,7 +315,7 @@ M.BarSection {
|
||||||
id: streamEntry
|
id: streamEntry
|
||||||
required property var modelData
|
required property var modelData
|
||||||
|
|
||||||
width: 220
|
width: deviceList.width
|
||||||
height: 32
|
height: 32
|
||||||
|
|
||||||
readonly property string _appName: modelData.properties["application.name"] || modelData.description || modelData.name || "Unknown"
|
readonly property string _appName: modelData.properties["application.name"] || modelData.description || modelData.name || "Unknown"
|
||||||
|
|
@ -410,6 +403,12 @@ M.BarSection {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Bottom padding
|
||||||
|
Item {
|
||||||
|
width: 1
|
||||||
|
height: 4
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue