mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
taskpanel: Use 'visible' to check keyboard state, not 'active'
The virtual keyboard can be active but not visible. We want to use the visibile property when determining whether there is a keyboard visually showing.
This commit is contained in:
parent
d3cb51bef6
commit
b41a80466a
2 changed files with 5 additions and 5 deletions
|
|
@ -86,13 +86,13 @@ MobileShell.NavigationPanel {
|
|||
rightAction: MobileShell.NavigationPanelAction {
|
||||
id: closeAppAction
|
||||
|
||||
enabled: Keyboards.KWinVirtualKeyboard.active || WindowPlugin.WindowUtil.hasCloseableActiveWindow
|
||||
iconSource: Keyboards.KWinVirtualKeyboard.active ? "go-down-symbolic" : "mobile-close-app"
|
||||
enabled: Keyboards.KWinVirtualKeyboard.visible || WindowPlugin.WindowUtil.hasCloseableActiveWindow
|
||||
iconSource: Keyboards.KWinVirtualKeyboard.visible ? "go-down-symbolic" : "mobile-close-app"
|
||||
// mobile-close-app (from plasma-frameworks) seems to have fewer margins than icons from breeze-icons
|
||||
iconSizeFactor: Keyboards.KWinVirtualKeyboard.active ? 1 : 0.75
|
||||
iconSizeFactor: Keyboards.KWinVirtualKeyboard.visible ? 1 : 0.75
|
||||
|
||||
onTriggered: {
|
||||
if (Keyboards.KWinVirtualKeyboard.active) {
|
||||
if (Keyboards.KWinVirtualKeyboard.visible) {
|
||||
// close keyboard if it is open
|
||||
Keyboards.KWinVirtualKeyboard.active = false;
|
||||
} else if (WindowPlugin.WindowUtil.hasCloseableActiveWindow) {
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ ContainmentItem {
|
|||
Kirigami.Theme.colorSet: root.opaqueBar ? Kirigami.Theme.Window : Kirigami.Theme.Complementary
|
||||
Kirigami.Theme.inherit: false
|
||||
|
||||
color: navigationPanel.state == "default" && (Keyboards.KWinVirtualKeyboard.active || root.opaqueBar) ? Kirigami.Theme.backgroundColor : "transparent"
|
||||
color: navigationPanel.state == "default" && (Keyboards.KWinVirtualKeyboard.visible || root.opaqueBar) ? Kirigami.Theme.backgroundColor : "transparent"
|
||||
|
||||
property real offset: 0
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue