mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-27 06:33:08 +00:00
This switches the kwin effect to be a declarative effect. However, for now I have retained much of the logic that exists in cpp as a QML plugin. Fixes https://invent.kde.org/plasma/plasma-mobile/-/issues/448 Also implements https://invent.kde.org/plasma/plasma-mobile/-/issues/408 now that we can access the QML api
38 lines
No EOL
926 B
QML
38 lines
No EOL
926 B
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
|
|
|
|
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
|
|
|
|
Component.onCompleted: {
|
|
// Initialize with effect
|
|
taskSwitcherState.init(root);
|
|
}
|
|
}
|
|
} |