2023-03-20 04:10:14 +00:00
|
|
|
// SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
|
|
|
|
|
// SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
|
|
|
|
|
|
|
|
|
import QtQuick
|
2023-11-02 11:08:17 +00:00
|
|
|
import org.kde.plasma.private.mobileshell as MobileShell
|
2023-03-20 04:10:14 +00:00
|
|
|
|
|
|
|
|
pragma Singleton
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* This wraps the VolumeOSDProvider component so that we can avoid loading side
|
|
|
|
|
* effects from imports (since this is a singleton and initialized immediately on import).
|
|
|
|
|
*/
|
|
|
|
|
Loader {
|
|
|
|
|
id: root
|
2023-11-02 11:08:17 +00:00
|
|
|
sourceComponent: Component {
|
|
|
|
|
MobileShell.VolumeOSDProvider {}
|
|
|
|
|
}
|
2023-03-20 04:10:14 +00:00
|
|
|
|
|
|
|
|
// WARNING: only call this load from within the plasmashell process, because
|
|
|
|
|
// multiple bindings of the shortcut may break it entirely (hardware volume keys)
|
|
|
|
|
function load() {
|
|
|
|
|
root.active = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|