Commit b27e6703 authored by Marco Martin's avatar Marco Martin

rework panel coloring logic based on tasks

parent f7843014
......@@ -47,7 +47,9 @@ Item {
property bool reorderingApps: false
property var layoutManager: LayoutManager
readonly property bool showingApp: tasksModel.activeTask && tasksModel.activeTask.valid && !tasksModel.data(tasksModel.activeTask, TaskManager.AbstractTasksModel.IsFullScreen) || NanoShell.StartupFeedback.visible
readonly property bool showingApp: !plasmoid.nativeInterface.showDesktop && (hasTasks || NanoShell.StartupFeedback.visible)
readonly property bool hasTasks: tasksModel.count > 0
Containment.onAppletAdded: {
addApplet(applet, x, y);
......@@ -94,7 +96,8 @@ Item {
screenGeometry: plasmoid.screenGeometry
filterByScreen: plasmoid.configuration.showForCurrentScreenOnly
//FIXME: workaround
Component.onCompleted: tasksModel.countChanged();
}
PlasmaCore.DataSource {
......
......@@ -153,6 +153,11 @@ NanoShell.FullScreenOverlay {
TaskManager.TasksModel {
id: tasksModel
sortMode: TaskManager.TasksModel.SortVirtualDesktop
groupMode: TaskManager.TasksModel.GroupDisabled
screenGeometry: plasmoid.screenGeometry
filterByScreen: plasmoid.configuration.showForCurrentScreenOnly
}
//This proxy is only used for "get"
PlasmaCore.SortFilterModel {
......
......@@ -37,7 +37,9 @@ PlasmaCore.ColorScope {
Plasmoid.backgroundHints: PlasmaCore.Types.NoBackground
readonly property bool showingApp: tasksModel.activeTask && tasksModel.activeTask.valid && !tasksModel.data(tasksModel.activeTask, TaskManager.AbstractTasksModel.IsFullScreen) || NanoShell.StartupFeedback.visible
readonly property bool showingApp: !plasmoid.nativeInterface.showDesktop && (hasTasks || NanoShell.StartupFeedback.visible)
readonly property bool hasTasks: tasksModel.count > 0
property QtObject taskSwitcher: taskSwitcherLoader.item ? taskSwitcherLoader.item : null
Loader {
......@@ -52,12 +54,24 @@ PlasmaCore.ColorScope {
TaskManager.TasksModel {
id: tasksModel
sortMode: TaskManager.TasksModel.SortVirtualDesktop
groupMode: TaskManager.TasksModel.GroupDisabled
screenGeometry: plasmoid.screenGeometry
filterByScreen: plasmoid.configuration.showForCurrentScreenOnly
sortMode: TaskManager.TasksModel.SortAlpha
virtualDesktop: virtualDesktopInfo.currentDesktop
activity: activityInfo.currentActivity
//FIXME: workaround
Component.onCompleted: tasksModel.countChanged();
}
TaskManager.VirtualDesktopInfo {
id: virtualDesktopInfo
}
TaskManager.ActivityInfo {
id: activityInfo
}
MouseArea {
......@@ -153,7 +167,7 @@ PlasmaCore.ColorScope {
anchors.left: parent.left
height: parent.height
width: parent.width/3
enabled: taskSwitcher && taskSwitcher.tasksCount > 0;
enabled: root.hasTasks
iconSource: "box"
onClicked: {
plasmoid.nativeInterface.showDesktop = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment