38 lines
881 B
QML
38 lines
881 B
QML
import Quickshell
|
|
import Quickshell.Services.Pipewire
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
import qs.modules.applets
|
|
import qs.widgets
|
|
import qs.settings
|
|
import qs.modules.Services
|
|
|
|
BarComponent {
|
|
id: root
|
|
active: clickHandler.containsMouse
|
|
implicitWidth: pwLayout.implicitWidth + 16
|
|
RowLayout {
|
|
id: pwLayout
|
|
anchors.centerIn: root
|
|
spacing: 4
|
|
StyledIcon {
|
|
iconName: Audio.getVolumeIcon(Audio.defaultAudio)
|
|
}
|
|
StyledText {
|
|
text: Audio.percentage + "%"
|
|
opacity: Audio.muted ? 0.6 : 1.0
|
|
}
|
|
}
|
|
MouseArea {
|
|
id: clickHandler
|
|
hoverEnabled: true
|
|
acceptedButtons: Qt.LeftButton
|
|
cursorShape: Qt.PointingHandCursor
|
|
anchors.fill: root
|
|
onClicked: volPopup.visible = !volPopup.visible
|
|
}
|
|
VolPopup {
|
|
id: volPopup
|
|
anchor.item: root
|
|
}
|
|
}
|