mirror of
https://invent.kde.org/plasma/plasma-desktop.git
synced 2026-11-03 22:59:45 -09:00
sddm-theme: drop vkb wrapper, use KWinVirtualKeyboard directly
Wrapper existed to support both X11 and Wayland, since we only support Wayland now we can use KWinVirtualKeyboard directly.
This commit is contained in:
parent
a0f6640045
commit
b1eed7f756
1 changed files with 14 additions and 20 deletions
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
SPDX-FileCopyrightText: 2016 David Edmundson <davidedmundson@kde.org>
|
||||
SPDX-FileCopyrightText: 2026 Kristen McWilliam <kristen@kde.org>
|
||||
|
||||
SPDX-License-Identifier: LGPL-2.0-or-later
|
||||
*/
|
||||
|
|
@ -11,6 +12,7 @@ import Qt5Compat.GraphicalEffects
|
|||
|
||||
import org.kde.plasma.components as PlasmaComponents3
|
||||
import org.kde.plasma.private.keyboardindicator as KeyboardIndicator
|
||||
import org.kde.plasma.workspace.keyboardlayout as Keyboards
|
||||
import org.kde.kirigami as Kirigami
|
||||
|
||||
import org.kde.breeze.components
|
||||
|
|
@ -63,7 +65,7 @@ Item {
|
|||
anchors.fill: parent
|
||||
|
||||
property bool uiVisible: true
|
||||
property bool blockUI: mainStack.depth > 1 || userListComponent.mainPasswordBox.text.length > 0 || inputPanel.keyboardActive || config.type !== "image"
|
||||
property bool blockUI: mainStack.depth > 1 || userListComponent.mainPasswordBox.text.length > 0 || Keyboards.KWinVirtualKeyboard.visible || config.type !== "image"
|
||||
|
||||
hoverEnabled: true
|
||||
drag.filterChildren: true
|
||||
|
|
@ -205,7 +207,7 @@ Item {
|
|||
return parts.join(" • ");
|
||||
}
|
||||
|
||||
actionItemsVisible: !inputPanel.keyboardActive
|
||||
actionItemsVisible: !Keyboards.KWinVirtualKeyboard.visible
|
||||
actionItems: [
|
||||
ActionButton {
|
||||
icon.name: "system-hibernate"
|
||||
|
|
@ -313,17 +315,6 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
VirtualKeyboardLoader {
|
||||
id: inputPanel
|
||||
|
||||
z: 1
|
||||
|
||||
screenRoot: root
|
||||
mainStack: mainStack
|
||||
mainBlock: userListComponent
|
||||
passwordField: userListComponent.mainPasswordBox
|
||||
}
|
||||
|
||||
Component {
|
||||
id: userPromptComponent
|
||||
Login {
|
||||
|
|
@ -350,7 +341,7 @@ Item {
|
|||
sddm.login(username, password, sessionButton.currentIndex)
|
||||
}
|
||||
|
||||
actionItemsVisible: !inputPanel.keyboardActive
|
||||
actionItemsVisible: !Keyboards.KWinVirtualKeyboard.visible
|
||||
actionItems: [
|
||||
ActionButton {
|
||||
icon.name: "system-suspend"
|
||||
|
|
@ -447,14 +438,17 @@ Item {
|
|||
id: virtualKeyboardButton
|
||||
|
||||
text: i18ndc("plasma-desktop-sddm-theme", "Button to show/hide virtual keyboard", "Virtual Keyboard")
|
||||
icon.name: inputPanel.keyboardActive ? "input-keyboard-virtual-on" : "input-keyboard-virtual-off"
|
||||
icon.name: Keyboards.KWinVirtualKeyboard.visible ? "input-keyboard-virtual-on" : "input-keyboard-virtual-off"
|
||||
onClicked: {
|
||||
// Otherwise the password field loses focus and virtual keyboard
|
||||
// keystrokes get eaten
|
||||
userListComponent.mainPasswordBox.forceActiveFocus();
|
||||
inputPanel.showHide()
|
||||
if (Keyboards.KWinVirtualKeyboard.visible) {
|
||||
Keyboards.KWinVirtualKeyboard.active = false;
|
||||
} else {
|
||||
// Otherwise the password field loses focus and on-screen keyboard
|
||||
// keystrokes get eaten
|
||||
userListComponent.mainPasswordBox.forceActiveFocus();
|
||||
Keyboards.KWinVirtualKeyboard.forceActivate();
|
||||
}
|
||||
}
|
||||
visible: inputPanel.status === Loader.Ready
|
||||
|
||||
Layout.fillHeight: true
|
||||
containmentMask: Item {
|
||||
|
|
|
|||
Loading…
Reference in a new issue