lockscreen: don't make password bar go off the screen if keyboard reports height larger than screen height

This commit is contained in:
Devin Lin 2021-06-01 18:32:09 -04:00
parent 76dca349eb
commit 19e3840a23

View file

@ -36,7 +36,8 @@ Rectangle {
if (passwordBar.isPinMode && !Qt.inputMethod.visible) {
return PlasmaCore.Units.gridUnit * 17;
} else {
return PlasmaCore.Units.smallSpacing * 2 + Qt.inputMethod.keyboardRectangle.height + passwordBar.implicitHeight;
return Math.min(root.height - passwordBar.implicitHeight, // don't make the password bar go off the screen
PlasmaCore.Units.smallSpacing * 2 + Qt.inputMethod.keyboardRectangle.height + passwordBar.implicitHeight);
}
}
Behavior on implicitHeight {