From 19e3840a236cc52a779f4146548cd8d2464ab195 Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Tue, 1 Jun 2021 18:32:09 -0400 Subject: [PATCH] lockscreen: don't make password bar go off the screen if keyboard reports height larger than screen height --- look-and-feel/contents/lockscreen/Keypad.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/look-and-feel/contents/lockscreen/Keypad.qml b/look-and-feel/contents/lockscreen/Keypad.qml index f19b15d9..7397dcd4 100644 --- a/look-and-feel/contents/lockscreen/Keypad.qml +++ b/look-and-feel/contents/lockscreen/Keypad.qml @@ -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 {