mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Add model.isSupported checking
This commit is contained in:
parent
494e1242c3
commit
78a7e641e2
1 changed files with 5 additions and 1 deletions
|
|
@ -121,6 +121,10 @@ MouseArea {
|
|||
readonly property string pluginName: model.pluginName
|
||||
|
||||
onPressAndHold: {
|
||||
if (!model.isSupported) {
|
||||
return
|
||||
}
|
||||
|
||||
root.requestClose();
|
||||
folio.HomeScreenState.closeSettingsView();
|
||||
haptics.buttonVibrate();
|
||||
|
|
@ -193,7 +197,7 @@ MouseArea {
|
|||
Layout.alignment: Qt.AlignTop
|
||||
// otherwise causes binding loop due to the way the Plasma sets the height
|
||||
height: implicitHeight
|
||||
text: model.description
|
||||
text: model.isSupported ? model.description : model.unsupportedMessage
|
||||
font.pointSize: Kirigami.Theme.smallFont.pointSize
|
||||
wrapMode: Text.Wrap
|
||||
elide: Text.ElideRight
|
||||
|
|
|
|||
Loading…
Reference in a new issue