diff --git a/containments/panel/package/contents/ui/main.qml b/containments/panel/package/contents/ui/main.qml index 2d3791c3..e7316f9d 100644 --- a/containments/panel/package/contents/ui/main.qml +++ b/containments/panel/package/contents/ui/main.qml @@ -18,12 +18,14 @@ import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.private.nanoshell 2.0 as NanoShell import org.kde.plasma.private.mobileshell 1.0 as MobileShell +import org.kde.taskmanager 0.1 as TaskManager import org.kde.notificationmanager 1.0 as NotificationManager Item { id: root - readonly property bool showingApp: !MobileShell.WindowUtil.allWindowsMinimizedExcludingShell + // only opaque if there are no maximized windows on this screen + readonly property bool showingApp: visibleMaximizedWindowsModel.count > 0 readonly property color backgroundColor: topPanel.colorScopeColor Plasmoid.backgroundHints: showingApp ? PlasmaCore.Types.StandardBackground : PlasmaCore.Types.NoBackground @@ -76,6 +78,34 @@ Item { MobileShell.VolumeProvider.bindShortcuts = true; } + TaskManager.VirtualDesktopInfo { + id: virtualDesktopInfo + } + + TaskManager.ActivityInfo { + id: activityInfo + } + + PlasmaCore.SortFilterModel { + id: visibleMaximizedWindowsModel + filterRole: 'IsMinimized' + filterRegExp: 'false' + sourceModel: TaskManager.TasksModel { + id: tasksModel + filterByVirtualDesktop: true + filterByActivity: true + filterNotMaximized: true + filterByScreen: true + filterHidden: true + +// screenGeometry: panel.screenGeometry + virtualDesktop: virtualDesktopInfo.currentDesktop + activity: activityInfo.currentActivity + + groupMode: TaskManager.TasksModel.GroupDisabled + } + } + // top panel component MobileShell.StatusBar { id: topPanel @@ -97,7 +127,6 @@ Item { id: drawer actionDrawer.notificationSettings: NotificationManager.Settings {} - actionDrawer.notificationModel: NotificationManager.Notifications { showExpired: true showDismissed: true diff --git a/containments/taskpanel/package/contents/ui/NavigationPanelComponent.qml b/containments/taskpanel/package/contents/ui/NavigationPanelComponent.qml index 6e51f409..db3772d2 100644 --- a/containments/taskpanel/package/contents/ui/NavigationPanelComponent.qml +++ b/containments/taskpanel/package/contents/ui/NavigationPanelComponent.qml @@ -16,7 +16,7 @@ import org.kde.plasma.private.mobileshell 1.0 as MobileShell MobileShell.NavigationPanel { id: root - property bool appIsShown: !MobileShell.WindowUtil.allWindowsMinimizedExcludingShell + required property bool opaqueBar // background is: // - opaque if an app is shown or vkbd is shown @@ -26,11 +26,11 @@ MobileShell.NavigationPanel { if (root.taskSwitcher.visible) { return Qt.rgba(0, 0, 0, 0.1); } else { - return (Keyboards.KWinVirtualKeyboard.visible || appIsShown) ? PlasmaCore.ColorScope.backgroundColor : "transparent"; + return (Keyboards.KWinVirtualKeyboard.visible || opaqueBar) ? PlasmaCore.ColorScope.backgroundColor : "transparent"; } } - foregroundColorGroup: (!root.taskSwitcher.visible && appIsShown) ? PlasmaCore.Theme.NormalColorGroup : PlasmaCore.Theme.ComplementaryColorGroup - shadow: !appIsShown + foregroundColorGroup: (!root.taskSwitcher.visible && opaqueBar) ? PlasmaCore.Theme.NormalColorGroup : PlasmaCore.Theme.ComplementaryColorGroup + shadow: !opaqueBar // do not enable drag gesture when task switcher is already open // also don't disable drag gesture mid-drag diff --git a/containments/taskpanel/package/contents/ui/main.qml b/containments/taskpanel/package/contents/ui/main.qml index beab237c..0b1b3d3a 100644 --- a/containments/taskpanel/package/contents/ui/main.qml +++ b/containments/taskpanel/package/contents/ui/main.qml @@ -21,13 +21,6 @@ import org.kde.plasma.phone.taskpanel 1.0 as TaskPanel PlasmaCore.ColorScope { id: root - width: 360 - - // contrasting colour - colorGroup: !MobileShell.WindowUtil.allWindowsMinimized ? PlasmaCore.Theme.NormalColorGroup : PlasmaCore.Theme.ComplementaryColorGroup - - readonly property color backgroundColor: PlasmaCore.ColorScope.backgroundColor - Plasmoid.backgroundHints: PlasmaCore.Types.NoBackground // toggle visibility of navigation bar (show, or use gestures only) @@ -114,18 +107,47 @@ PlasmaCore.ColorScope { } //END API implementation - - Window.onWindowChanged: { - if (!Window.window) { - return; + + TaskManager.VirtualDesktopInfo { + id: virtualDesktopInfo + } + + TaskManager.ActivityInfo { + id: activityInfo + } + + PlasmaCore.SortFilterModel { + id: visibleMaximizedWindowsModel + filterRole: 'IsMinimized' + filterRegExp: 'false' + sourceModel: TaskManager.TasksModel { + id: tasksModel + filterByVirtualDesktop: true + filterByActivity: true + filterNotMaximized: true + filterByScreen: true + filterHidden: true + +// screenGeometry: panel.screenGeometry + virtualDesktop: virtualDesktopInfo.currentDesktop + activity: activityInfo.currentActivity + + groupMode: TaskManager.TasksModel.GroupDisabled } } + + // only opaque if there are no maximized windows on this screen + readonly property bool opaqueBar: visibleMaximizedWindowsModel.count > 0 + + // contrasting colour + colorGroup: opaqueBar ? PlasmaCore.Theme.NormalColorGroup : PlasmaCore.Theme.ComplementaryColorGroup // bottom navigation panel component Component { id: navigationPanel NavigationPanelComponent { taskSwitcher: MobileShell.HomeScreenControls.taskSwitcher + opaqueBar: root.opaqueBar } }