mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-07-26 06:14:45 +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
|
readonly property string pluginName: model.pluginName
|
||||||
|
|
||||||
onPressAndHold: {
|
onPressAndHold: {
|
||||||
|
if (!model.isSupported) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
root.requestClose();
|
root.requestClose();
|
||||||
folio.HomeScreenState.closeSettingsView();
|
folio.HomeScreenState.closeSettingsView();
|
||||||
haptics.buttonVibrate();
|
haptics.buttonVibrate();
|
||||||
|
|
@ -193,7 +197,7 @@ MouseArea {
|
||||||
Layout.alignment: Qt.AlignTop
|
Layout.alignment: Qt.AlignTop
|
||||||
// otherwise causes binding loop due to the way the Plasma sets the height
|
// otherwise causes binding loop due to the way the Plasma sets the height
|
||||||
height: implicitHeight
|
height: implicitHeight
|
||||||
text: model.description
|
text: model.isSupported ? model.description : model.unsupportedMessage
|
||||||
font.pointSize: Kirigami.Theme.smallFont.pointSize
|
font.pointSize: Kirigami.Theme.smallFont.pointSize
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue