shift-shell/quicksettings/audio/contents/ui/main.qml
Devin Lin 24d3186834 quicksettings/audio: Close action drawer when opening volume osd
Now that the action drawer no longer takes focus, we need to manually
trigger the action drawer to close when opening the volume osd.
2024-11-14 17:20:12 +00:00

21 lines
684 B
QML

// SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
// SPDX-License-Identifier: LGPL-2.0-or-later
import QtQuick
import org.kde.plasma.private.mobileshell as MobileShell
import org.kde.plasma.private.mobileshell.state as MobileShellState
import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS
QS.QuickSetting {
text: i18n("Sound")
icon: MobileShell.AudioInfo.icon
status: i18n("%1%", MobileShell.AudioInfo.volumeValue)
enabled: false
settingsCommand: "plasma-open-settings kcm_pulseaudio"
function toggle() {
MobileShellState.ShellDBusClient.closeActionDrawer();
MobileShellState.ShellDBusClient.showVolumeOSD();
}
}