From b1888b5e9ecf864935a55c0878b1aa8578bfe5ca Mon Sep 17 00:00:00 2001 From: Nate Graham Date: Wed, 5 Jan 2022 12:23:47 -0700 Subject: [PATCH] applets/manage-inputmethod: only make it active in tablet mode Outside of tablet mode, you don't need a virtual keyboard except for the extremely niche case of not having a physical keyboard plugged into a desktop machine. For all other use cases, the tray item to show and hide the virtual keyboard is an annoyance when you're not in tablet mode, so let's demote it to the expanded popup to save space in the System Tray and make its contents more contextually relevant. --- .../manage-inputmethod/contents/ui/manage-inputmethod.qml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/applets/manage-inputmethod/contents/ui/manage-inputmethod.qml b/applets/manage-inputmethod/contents/ui/manage-inputmethod.qml index 33776f794..17ff4ff14 100644 --- a/applets/manage-inputmethod/contents/ui/manage-inputmethod.qml +++ b/applets/manage-inputmethod/contents/ui/manage-inputmethod.qml @@ -13,6 +13,7 @@ import org.kde.plasma.components 3.0 as PlasmaComponents3 import org.kde.plasma.extras 2.0 as PlasmaExtras import org.kde.plasma.workspace.keyboardlayout 1.0 as Keyboards import org.kde.kquickcontrolsaddons 2.0 +import org.kde.kirigami 2.5 as Kirigami // For Settings.tabletMode Item { id: root @@ -77,7 +78,8 @@ Item { PropertyChanges { target: plasmoid icon: "arrow-down" toolTipSubText: i18n("Virtual Keyboard: visible") - status: PlasmaCore.Types.ActiveStatus + // It's only relevant in tablet mode + status: Kirigami.Settings.tabletMode ? PlasmaCore.Types.ActiveStatus : PlasmaCore.Types.PassiveStatus } PropertyChanges { target: root; overlays: [] } }, @@ -87,7 +89,8 @@ Item { PropertyChanges { target: plasmoid icon: "input-keyboard-virtual-on" toolTipSubText: i18n("Virtual Keyboard: enabled") - status: PlasmaCore.Types.ActiveStatus + // It's only relevant in tablet mode + status: Kirigami.Settings.tabletMode ? PlasmaCore.Types.ActiveStatus : PlasmaCore.Types.PassiveStatus } PropertyChanges { target: root; overlays: [] } }