mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
Fixes https://invent.kde.org/plasma/plasma-mobile/-/issues/270 Introduce a direct haptics API for now for shell usage, and port to it. Also remove the vibration intensity setting as that didn't do anything.
16 lines
489 B
QML
16 lines
489 B
QML
// SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
import QtQuick 2.15
|
|
|
|
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
|
import org.kde.plasma.private.mobileshell.hapticsplugin as HapticsPlugin
|
|
|
|
QtObject {
|
|
function buttonVibrate() {
|
|
if (ShellSettings.Settings.vibrationsEnabled) {
|
|
HapticsPlugin.VibrationManager.vibrate(ShellSettings.Settings.vibrationDuration);
|
|
}
|
|
}
|
|
}
|
|
|