right sidebar: move audio controls to dialogs

This commit is contained in:
end-4
2025-10-19 23:58:45 +02:00
parent 0fe7bdc5b5
commit fec23cab8d
14 changed files with 248 additions and 388 deletions
@@ -8,7 +8,7 @@ import Quickshell
AndroidQuickToggleButton {
id: root
name: Translation.tr("Audio")
name: Translation.tr("Audio output")
statusText: toggled ? Translation.tr("Unmuted") : Translation.tr("Muted")
toggled: !Audio.sink?.audio?.muted
buttonIcon: Audio.sink?.audio?.muted ? "volume_off" : "volume_up"
@@ -16,7 +16,11 @@ AndroidQuickToggleButton {
Audio.sink.audio.muted = !Audio.sink.audio.muted
}
altAction: () => {
root.openMenu()
}
StyledToolTip {
text: Translation.tr("Audio")
text: Translation.tr("Audio output | Right-click for volume mixer & device selector")
}
}
@@ -17,11 +17,14 @@ AndroidQuickToggleButton {
onClicked: {
Bluetooth.defaultAdapter.enabled = !Bluetooth.defaultAdapter?.enabled
}
altAction: () => {
root.openMenu()
}
StyledToolTip {
text: Translation.tr("%1 | Right-click to configure").arg(
(BluetoothStatus.firstActiveDevice?.name ?? Translation.tr("Bluetooth"))
+ (BluetoothStatus.activeDeviceCount > 1 ? ` +${BluetoothStatus.activeDeviceCount - 1}` : "")
)
)
}
}
@@ -8,7 +8,7 @@ import Quickshell
AndroidQuickToggleButton {
id: root
name: Translation.tr("Microphone")
name: Translation.tr("Audio input")
statusText: toggled ? Translation.tr("Enabled") : Translation.tr("Muted")
toggled: !Audio.source?.audio?.muted
buttonIcon: Audio.source?.audio?.muted ? "mic_off" : "mic"
@@ -16,7 +16,11 @@ AndroidQuickToggleButton {
Audio.source.audio.muted = !Audio.source.audio.muted
}
altAction: () => {
root.openMenu()
}
StyledToolTip {
text: Translation.tr("Microphone")
text: Translation.tr("Audio input | Right-click for volume mixer & device selector")
}
}
@@ -7,8 +7,6 @@ import QtQuick.Layouts
import Quickshell
import Quickshell.Bluetooth
import "./androidStyle/"
DelegateChooser {
id: root
property bool editMode: false
@@ -18,6 +16,8 @@ DelegateChooser {
required property int startingIndex
signal openWifiDialog()
signal openBluetoothDialog()
signal openAudioOutputDialog()
signal openAudioInputDialog()
role: "type"
@@ -32,7 +32,7 @@ DelegateChooser {
baseCellHeight: root.baseCellHeight
cellSpacing: root.spacing
cellSize: modelData.size
altAction: () => {
onOpenMenu: {
root.openWifiDialog()
}
} }
@@ -48,7 +48,7 @@ DelegateChooser {
baseCellHeight: root.baseCellHeight
cellSpacing: root.spacing
cellSize: modelData.size
altAction: () => {
onOpenMenu: {
root.openBluetoothDialog()
}
} }
@@ -181,6 +181,9 @@ DelegateChooser {
baseCellHeight: root.baseCellHeight
cellSpacing: root.spacing
cellSize: modelData.size
onOpenMenu: {
root.openAudioInputDialog()
}
} }
DelegateChoice { roleValue: "audio"; AndroidAudioToggle {
@@ -194,6 +197,9 @@ DelegateChooser {
baseCellHeight: root.baseCellHeight
cellSpacing: root.spacing
cellSize: modelData.size
onOpenMenu: {
root.openAudioOutputDialog()
}
} }
DelegateChoice { roleValue: "notifications"; AndroidNotificationToggle {