Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37736239
en ru br
Репозитории ALT

Группа :: Графические оболочки/KDE
Пакет: plasma5-workspace

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: alt-fix-virtualkeyboard.patch
Скачать


diff --git a/lookandfeel/contents/components/VirtualKeyboard.qml b/lookandfeel/contents/components/VirtualKeyboard.qml
index 503a35b21..4d5b8933e 100644
--- a/lookandfeel/org.kde.breeze/contents/components/VirtualKeyboard.qml
+++ b/lookandfeel/org.kde.breeze/contents/components/VirtualKeyboard.qml
@@ -10,6 +10,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore
 
 InputPanel {
     id: inputPanel
+    visible: false
     property bool activated: false
     active: activated && Qt.inputMethod.visible
     width: parent.width
@@ -22,7 +24,6 @@ InputPanel {
                 target: inputPanel
                 y: inputPanel.parent.height - inputPanel.height
                 opacity: 1
-                visible: true
             }
         },
         State {
@@ -32,7 +33,6 @@ InputPanel {
                 target: inputPanel
                 y: inputPanel.parent.height
                 opacity: 0
-                visible:false
             }
         }
     ]
@@ -52,6 +52,9 @@ InputPanel {
                     easing.type: Easing.OutQuad
                 }
             }
+            ScriptAction {
+                script: inputPanel.visible = true
+            }
         },
         Transition {
             to: "hidden"
@@ -65,6 +68,11 @@ InputPanel {
                     easing.type: Easing.InQuad
                 }
             }
+            onRunningChanged: {
+                if (!running) {
+                    inputPanel.visible = false
+                }
+            }
         }
     ]
 }
diff --git a/lookandfeel/contents/lockscreen/LockScreenUi.qml b/lookandfeel/contents/lockscreen/LockScreenUi.qml
index 3fa056038..fa30e323a 100644
--- a/lookandfeel/org.kde.breeze/contents/lockscreen/LockScreenUi.qml
+++ b/lookandfeel/org.kde.breeze/contents/lockscreen/LockScreenUi.qml
@@ -322,12 +322,15 @@ PlasmaCore.ColorScope {
             id: inputPanel
             state: "hidden"
             readonly property bool keyboardActive: item ? item.active : false
+            readonly property bool keyboardEnabled: item ? item.activated : false
             anchors {
                 left: parent.left
                 right: parent.right
             }
             function showHide() {
-                state = state == "hidden" ? "visible" : "hidden";
+                if (item) {
+                    item.activated = !item.activated
+                }
             }
             Component.onCompleted: {
                 inputPanel.source = Qt.platform.pluginName.includes("wayland") ? "../components/VirtualKeyboard_wayland.qml" : "../components/VirtualKeyboard.qml"
@@ -370,12 +373,6 @@ PlasmaCore.ColorScope {
                     from: "hidden"
                     to: "visible"
                     SequentialAnimation {
-                        ScriptAction {
-                            script: {
-                                inputPanel.item.activated = true;
-                                Qt.inputMethod.show();
-                            }
-                        }
                         ParallelAnimation {
                             NumberAnimation {
                                 target: mainStack
@@ -415,12 +412,6 @@ PlasmaCore.ColorScope {
                                 easing.type: Easing.InQuad
                             }
                         }
-                        ScriptAction {
-                            script: {
-                                inputPanel.item.activated = false;
-                                Qt.inputMethod.hide();
-                            }
-                        }
                     }
                 }
             ]
@@ -523,7 +514,7 @@ PlasmaCore.ColorScope {
             PlasmaComponents3.ToolButton {
                 focusPolicy: Qt.TabFocus
                 text: i18ndc("plasma_lookandfeel_org.kde.lookandfeel", "Button to show/hide virtual keyboard", "Virtual Keyboard")
-                icon.name: inputPanel.keyboardActive ? "input-keyboard-virtual-on" : "input-keyboard-virtual-off"
+                icon.name: inputPanel.keyboardEnabled ? "input-keyboard-virtual-on" : "input-keyboard-virtual-off"
                 onClicked: {
                     // Otherwise the password field loses focus and virtual keyboard
                     // keystrokes get eaten
--- a/lookandfeel/sddm-theme/Main.qml
+++ b/lookandfeel/org.kde.breeze/sddm-theme/Main.qml
@@ -332,12 +332,11 @@ PlasmaCore.ColorScope {
             id: inputPanel
             state: "hidden"
             property bool keyboardActive: item ? item.active : false
+            property bool keyboardEnabled: item ? item.activated : false
+
             onKeyboardActiveChanged: {
                 if (keyboardActive) {
                     state = "visible"
-                    // Otherwise the password field loses focus and virtual keyboard
-                    // keystrokes get eaten
-                    userListComponent.mainPasswordBox.forceActiveFocus();
                 } else {
                     state = "hidden";
                 }
@@ -351,6 +350,9 @@ PlasmaCore.ColorScope {
 
             function showHide() {
                 state = state === "hidden" ? "visible" : "hidden";
+                if (item) {
+                    item.activated = !item.activated
+                }
             }
 
             states: [
@@ -384,12 +386,6 @@ PlasmaCore.ColorScope {
                     from: "hidden"
                     to: "visible"
                     SequentialAnimation {
-                        ScriptAction {
-                            script: {
-                                inputPanel.item.activated = true;
-                                Qt.inputMethod.show();
-                            }
-                        }
                         ParallelAnimation {
                             NumberAnimation {
                                 target: mainStack
@@ -434,12 +430,6 @@ PlasmaCore.ColorScope {
                                 easing.type: Easing.InQuad
                             }
                         }
-                        ScriptAction {
-                            script: {
-                                inputPanel.item.activated = false;
-                                Qt.inputMethod.hide();
-                            }
-                        }
                     }
                 }
             ]
@@ -564,7 +554,7 @@ PlasmaCore.ColorScope {
             PlasmaComponents3.ToolButton {
                 text: i18ndc("plasma_lookandfeel_org.kde.lookandfeel", "Button to show/hide virtual keyboard", "Virtual Keyboard")
                 font.pointSize: config.fontSize
-                icon.name: inputPanel.keyboardActive ? "input-keyboard-virtual-on" : "input-keyboard-virtual-off"
+                icon.name: inputPanel.keyboardEnabled ? "input-keyboard-virtual-on" : "input-keyboard-virtual-off"
                 onClicked: {
                     // Otherwise the password field loses focus and virtual keyboard
                     // keystrokes get eaten
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin