shift-shell/quicksettings/dynamictiling/contents/ui/main.qml
Marco Allegretti 3fa5f90ed1 Add dynamic tiling toggle quick setting
Expose dynamicTilingEnabled (default true) on MobileShellSettings,
stored under the General group of plasmamobilerc and re-emitted by
the existing config watcher.  shift-tiling extends its activation
guard with this flag and clears the BSP layout when it goes false,
so users can fall back to KWin native quick-tile at will.

Add a quick-settings tile that surfaces the toggle.  available is
gated on convergenceModeEnabled and !gamingModeEnabled, so the tile
is hidden on the phone form factor and during gaming sessions.
2026-05-04 20:25:40 +02:00

23 lines
778 B
QML

// SPDX-FileCopyrightText: 2026 Marco Allegretti
// SPDX-License-Identifier: LGPL-2.0-or-later
import QtQuick
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS
QS.QuickSetting {
text: i18n("Dynamic Tiling")
icon: "view-grid-symbolic"
// Only meaningful in convergence (desktop) mode. Hidden everywhere else.
available: ShellSettings.Settings.convergenceModeEnabled
&& !ShellSettings.Settings.gamingModeEnabled
enabled: ShellSettings.Settings.dynamicTilingEnabled
status: enabled ? i18n("On") : i18n("Off")
function toggle() {
ShellSettings.Settings.dynamicTilingEnabled = !ShellSettings.Settings.dynamicTilingEnabled;
}
}