shift-shell/kwin/mobiletaskswitcher/package/contents/ui/main.qml
Devin Lin c76e19037c Ensure i18n is used with double quotes and add CI check
Apparently i18n doesn't support string literals with single quotes as
parameters. Fix occurrences of this and add a CI check to ensure this
won't happen in the future.
2025-08-11 18:19:41 -04:00

39 lines
1.1 KiB
QML

// SPDX-FileCopyrightText: 2025 Devin Lin <devin@kde.org>
// SPDX-License-Identifier: GPL-2.0-or-later
import QtQuick
import org.kde.kwin
import org.kde.plasma.private.mobileshell.taskswitcherplugin as TaskSwitcherPlugin
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
import org.kde.plasma.private.mobileshell.state as MobileShellState
SceneEffect {
id: root
// Created per screen
delegate: TaskSwitcher {
id: taskSwitcher
state: taskSwitcherState
}
ShortcutHandler {
name: 'Mobile Task Switcher'
text: i18n("Toggle Mobile Task Switcher")
sequence: 'Meta+C'
onActivated: taskSwitcherState.toggle()
}
TaskSwitcherPlugin.MobileTaskSwitcherState {
id: taskSwitcherState
gestureEnabled: !ShellSettings.Settings.navigationPanelEnabled && !MobileShellState.ShellDBusClient.isActionDrawerOpen && !MobileShellState.ShellDBusClient.isVolumeOSDOpen && !MobileShellState.ShellDBusClient.isNotificationPopupDrawerOpen
Component.onCompleted: {
// Initialize with effect
taskSwitcherState.init(root);
}
}
}