feat: add volume change OSD modules for audio sink and source and added Default Sink and Source to the Bar
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import QtQuick
|
||||
import "../../../config"
|
||||
import "../states/Audio"
|
||||
|
||||
MouseArea {
|
||||
id: audioButton
|
||||
|
||||
width: Math.max(audioText.width + Config.spacing_fun(height)*2, height)
|
||||
height: bar.height
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
enabled: Sink.exists
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: audioButton.containsMouse ? Colors.tertiary : Qt.alpha(Colors.tertiaryContainer, 0.25)
|
||||
radius: Config.radius_fun(audioButton.height)
|
||||
border.width: Config.border_width
|
||||
border.color: audioButton.containsMouse ? Colors.tertiaryContainer_fg
|
||||
: Colors.secondaryContainer_fg
|
||||
|
||||
Text {
|
||||
id: audioText
|
||||
text: (Source.mute ? "" :
|
||||
"")
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: Config.iconSize(bar.height)
|
||||
font.family: Config.font
|
||||
color: audioButton.containsMouse ? Colors.tertiary_fg : Colors.primary
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user