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.
wilder-5.24
Nate Graham 4 years ago
parent 37bf7e5d73
commit b1888b5e9e
  1. 7
      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: [] }
}

Loading…
Cancel
Save