mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-07-30 08:14:45 +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 {
|
rightAction: MobileShell.NavigationPanelAction {
|
||||||
id: closeAppAction
|
id: closeAppAction
|
||||||
|
|
||||||
enabled: Keyboards.KWinVirtualKeyboard.active || WindowPlugin.WindowUtil.hasCloseableActiveWindow
|
enabled: Keyboards.KWinVirtualKeyboard.visible || WindowPlugin.WindowUtil.hasCloseableActiveWindow
|
||||||
iconSource: Keyboards.KWinVirtualKeyboard.active ? "go-down-symbolic" : "mobile-close-app"
|
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
|
// 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: {
|
onTriggered: {
|
||||||
if (Keyboards.KWinVirtualKeyboard.active) {
|
if (Keyboards.KWinVirtualKeyboard.visible) {
|
||||||
// close keyboard if it is open
|
// close keyboard if it is open
|
||||||
Keyboards.KWinVirtualKeyboard.active = false;
|
Keyboards.KWinVirtualKeyboard.active = false;
|
||||||
} else if (WindowPlugin.WindowUtil.hasCloseableActiveWindow) {
|
} else if (WindowPlugin.WindowUtil.hasCloseableActiveWindow) {
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,7 @@ ContainmentItem {
|
||||||
Kirigami.Theme.colorSet: root.opaqueBar ? Kirigami.Theme.Window : Kirigami.Theme.Complementary
|
Kirigami.Theme.colorSet: root.opaqueBar ? Kirigami.Theme.Window : Kirigami.Theme.Complementary
|
||||||
Kirigami.Theme.inherit: false
|
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
|
property real offset: 0
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue