forked from Shinonome/dots-hyprland
wactioncenter: sound input menu
This commit is contained in:
+16
-16
@@ -12,8 +12,7 @@ import qs.modules.waffle.actionCenter
|
||||
|
||||
Item {
|
||||
id: root
|
||||
implicitWidth: 360
|
||||
implicitHeight: 352
|
||||
property bool output: true
|
||||
|
||||
PageColumn {
|
||||
anchors.fill: parent
|
||||
@@ -29,7 +28,7 @@ Item {
|
||||
|
||||
HeaderRow {
|
||||
Layout.fillWidth: true
|
||||
title: qsTr("Sound output")
|
||||
title: root.output ? qsTr("Sound output") : qsTr("Sound input")
|
||||
}
|
||||
|
||||
StyledFlickable {
|
||||
@@ -85,45 +84,46 @@ Item {
|
||||
spacing: 4
|
||||
|
||||
SectionText {
|
||||
text: qsTr("Output device")
|
||||
text: root.output ? qsTr("Output device") : qsTr("Input device")
|
||||
}
|
||||
|
||||
Repeater {
|
||||
model: ScriptModel {
|
||||
values: Audio.outputDevices
|
||||
values: root.output ? Audio.outputDevices : Audio.inputDevices
|
||||
}
|
||||
delegate: WChoiceButton {
|
||||
required property var modelData
|
||||
icon.name: WIcons.audioDeviceIcon(modelData)
|
||||
text: Audio.friendlyDeviceName(modelData)
|
||||
checked: Audio.sink === modelData
|
||||
checked: (root.output ? Audio.sink : Audio.source) === modelData
|
||||
onClicked: {
|
||||
Audio.setDefaultSink(modelData);
|
||||
if (root.output) Audio.setDefaultSink(modelData);
|
||||
else Audio.setDefaultSource(modelData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Separator {
|
||||
visible: EasyEffects.available
|
||||
Separator {
|
||||
visible: EasyEffects.available && root.output
|
||||
color: Looks.colors.bg2Hover
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
SectionText {
|
||||
visible: EasyEffects.available
|
||||
visible: EasyEffects.available && root.output
|
||||
text: qsTr("Sound effects")
|
||||
}
|
||||
|
||||
WChoiceButton {
|
||||
visible: EasyEffects.available
|
||||
visible: EasyEffects.available && root.output
|
||||
text: Translation.tr("Off")
|
||||
checked: !EasyEffects.active
|
||||
onClicked: EasyEffects.disable()
|
||||
}
|
||||
|
||||
WChoiceButton {
|
||||
visible: EasyEffects.available
|
||||
visible: EasyEffects.available && root.output
|
||||
text: "EasyEffects"
|
||||
checked: EasyEffects.active
|
||||
onClicked: EasyEffects.enable()
|
||||
@@ -141,14 +141,14 @@ Item {
|
||||
}
|
||||
|
||||
VolumeEntry {
|
||||
node: Audio.sink
|
||||
icon: "speaker"
|
||||
node: root.output ? Audio.sink : Audio.source
|
||||
icon: root.output ? "speaker" : "mic-on"
|
||||
monochrome: true
|
||||
}
|
||||
|
||||
Repeater {
|
||||
model: ScriptModel {
|
||||
values: Audio.outputAppNodes
|
||||
values: root.output ? Audio.outputAppNodes : Audio.inputAppNodes
|
||||
}
|
||||
delegate: VolumeEntry {
|
||||
required property var modelData
|
||||
|
||||
Reference in New Issue
Block a user