mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-06-11 16:57:43 +00:00
Kirigami.Icon { isMask: true } flattens an SVG to its alpha, so when a quick-setting tile resolves to a colored preferences/scalable glyph the whole rounded background collapses into a solid square. Append -symbolic to the five icon names that collided with colored tiles and add symlink aliases where no real symbolic variant exists yet. Guard the regression with a check in tests/check-shift-icon-theme.sh.
29 lines
1.1 KiB
QML
29 lines
1.1 KiB
QML
/*
|
|
* SPDX-FileCopyrightText: 2021 Aleix Pol Gonzalez <aleixpol@kde.org>
|
|
* SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS
|
|
import org.kde.plasma.private.mobileshell as MobileShell
|
|
import org.kde.plasma.workspace.keyboardlayout 1.0 as Keyboards
|
|
|
|
QS.QuickSetting {
|
|
text: i18n("Virtual Keyboard")
|
|
icon: "input-keyboard-virtual-symbolic"
|
|
status: enabled ? i18n("On") :
|
|
(Keyboards.KWinVirtualKeyboard.available ? i18n("Off") : i18n("Tap to open settings"))
|
|
enabled: Keyboards.KWinVirtualKeyboard.enabled && Keyboards.KWinVirtualKeyboard.available
|
|
settingsCommand: "plasma-open-settings kcm_mobile_onscreenkeyboard"
|
|
|
|
function toggle() {
|
|
if (!Keyboards.KWinVirtualKeyboard.available) {
|
|
// select a keyboard in the settings (none is likely set)
|
|
MobileShell.ShellUtil.executeCommand("plasma-open-settings kcm_virtualkeyboard");
|
|
} else {
|
|
Keyboards.KWinVirtualKeyboard.enabled = !enabled;
|
|
}
|
|
}
|
|
}
|
|
|
|
|