navigationpanel: Make opaque when keyboard is open

Addresses https://invent.kde.org/plasma/plasma-mobile/-/issues/163
This commit is contained in:
Devin Lin 2022-02-21 00:53:28 -05:00
parent 48899f6e97
commit df2eb79559

View file

@ -18,14 +18,14 @@ MobileShell.NavigationPanel {
property bool appIsShown: !plasmoid.nativeInterface.allMinimized property bool appIsShown: !plasmoid.nativeInterface.allMinimized
// background is: // background is:
// - opaque if an app is shown // - opaque if an app is shown or vkbd is shown
// - translucent if the task switcher is open // - translucent if the task switcher is open
// - transparent if on the homescreen // - transparent if on the homescreen
backgroundColor: { backgroundColor: {
if (root.taskSwitcher.visible) { if (root.taskSwitcher.visible) {
return Qt.rgba(0, 0, 0, 0.1); return Qt.rgba(0, 0, 0, 0.1);
} else { } else {
return appIsShown ? PlasmaCore.ColorScope.backgroundColor : "transparent"; return (MobileShell.KWinVirtualKeyboard.visible || appIsShown) ? PlasmaCore.ColorScope.backgroundColor : "transparent";
} }
} }
foregroundColorGroup: (!root.taskSwitcher.visible && appIsShown) ? PlasmaCore.Theme.NormalColorGroup : PlasmaCore.Theme.ComplementaryColorGroup foregroundColorGroup: (!root.taskSwitcher.visible && appIsShown) ? PlasmaCore.Theme.NormalColorGroup : PlasmaCore.Theme.ComplementaryColorGroup