Huge quickshell progress dump
Was requested
This commit is contained in:
parent
57d9f9a72e
commit
945793973e
42 changed files with 2140 additions and 142 deletions
|
|
@ -0,0 +1,78 @@
|
|||
import QtQuick
|
||||
import Quickshell.Services.Pipewire
|
||||
import ".."
|
||||
|
||||
ClickableIcon {
|
||||
id: root
|
||||
required property var bar;
|
||||
required property PwNode node;
|
||||
property bool mixerOpen: false;
|
||||
|
||||
PwObjectTracker { objects: [ node ] }
|
||||
|
||||
implicitHeight: width;
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton;
|
||||
showPressed: mixerOpen
|
||||
|
||||
onClicked: event => {
|
||||
event.accepted = true;
|
||||
if (event.button === Qt.LeftButton) {
|
||||
node.audio.muted = !node.audio.muted;
|
||||
} else if (event.button === Qt.RightButton) {
|
||||
mixerOpen = !mixerOpen;
|
||||
}
|
||||
}
|
||||
|
||||
onWheel: event => {
|
||||
event.accepted = true;
|
||||
node.audio.volume += (event.angleDelta.y / 120) * 0.05
|
||||
}
|
||||
|
||||
property var tooltip: TooltipItem {
|
||||
tooltip: bar.tooltip
|
||||
owner: root
|
||||
|
||||
show: root.containsMouse || mouseArea.containsMouse
|
||||
hoverable: true
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
hoverEnabled: true
|
||||
acceptedButtons: Qt.NoButton
|
||||
|
||||
implicitWidth: childrenRect.width
|
||||
implicitHeight: childrenRect.height
|
||||
|
||||
VolumeSlider {
|
||||
implicitWidth: 200
|
||||
implicitHeight: root.height
|
||||
|
||||
//enabled: !node.audio.muted
|
||||
value: node.audio.volume
|
||||
onValueChanged: node.audio.volume = value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
property var rightclickMenu: TooltipItem {
|
||||
tooltip: bar.tooltip
|
||||
owner: root
|
||||
|
||||
isMenu: true
|
||||
show: mixerOpen
|
||||
|
||||
onClose: mixerOpen = false
|
||||
/*onVisibleChanged: {
|
||||
if (!visible) mixerOpen = false;
|
||||
}*/
|
||||
|
||||
Loader {
|
||||
active: rightclickMenu.visible
|
||||
sourceComponent: Mixer {
|
||||
width: 550
|
||||
trackedNode: node
|
||||
nodeImage: root.image
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue