* Adds ability to disable/enable status icons Improves the hover calculations so that it's not hardcoded. This should make it easier to add/remove status icons. Also adds an optional audio status icon. * status: move config to barconfig * fixes * fix merge * loader icons * fix audio popout --------- Co-authored-by: Kaj Giesbers <kajgiesbers@gmail.com> Co-authored-by: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
57 lines
1.2 KiB
QML
57 lines
1.2 KiB
QML
import qs.widgets
|
|
import qs.services
|
|
import qs.config
|
|
import QtQuick.Layouts
|
|
import Quickshell
|
|
|
|
ColumnLayout {
|
|
id: root
|
|
|
|
required property var wrapper
|
|
|
|
spacing: Appearance.spacing.normal
|
|
|
|
VerticalSlider {
|
|
id: volumeSlider
|
|
|
|
icon: {
|
|
if (Audio.muted)
|
|
return "no_sound";
|
|
if (value >= 0.5)
|
|
return "volume_up";
|
|
if (value > 0)
|
|
return "volume_down";
|
|
return "volume_mute";
|
|
}
|
|
|
|
value: Audio.volume
|
|
onMoved: Audio.setVolume(value)
|
|
|
|
implicitWidth: Config.osd.sizes.sliderWidth
|
|
implicitHeight: Config.osd.sizes.sliderHeight
|
|
}
|
|
|
|
StyledRect {
|
|
id: pavuButton
|
|
|
|
implicitWidth: implicitHeight
|
|
implicitHeight: icon.implicitHeight + Appearance.padding.small * 2
|
|
|
|
radius: Appearance.rounding.normal
|
|
color: Colours.palette.m3surfaceContainer
|
|
|
|
StateLayer {
|
|
function onClicked(): void {
|
|
root.wrapper.hasCurrent = false;
|
|
Quickshell.execDetached(["pavucontrol"]);
|
|
}
|
|
}
|
|
|
|
MaterialIcon {
|
|
id: icon
|
|
|
|
anchors.centerIn: parent
|
|
text: "settings"
|
|
}
|
|
}
|
|
}
|