bottom panel transparent when showing desktop

This commit is contained in:
Marco Martin 2019-10-11 11:49:18 +02:00
parent 902eed0258
commit 38459f3e78
2 changed files with 31 additions and 5 deletions

View file

@ -172,7 +172,7 @@ Item {
Column { Column {
id: flickableContents id: flickableContents
width: mainFlickable.width width: mainFlickable.width
spacing: Math.max(0, favoriteStrip.frame.height - mainFlickable.contentY) spacing: Math.max(0, favoriteStrip.frame.height + favoriteStrip.anchors.bottomMargin - mainFlickable.contentY)
DragDrop.DropArea { DragDrop.DropArea {
anchors { anchors {

View file

@ -32,7 +32,9 @@ PlasmaCore.ColorScope {
height: 480 height: 480
//colorGroup: PlasmaCore.Theme.ComplementaryColorGroup //colorGroup: PlasmaCore.Theme.ComplementaryColorGroup
Plasmoid.backgroundHints: plasmoid.configuration.PanelButtonsVisible ? PlasmaCore.Types.StandardBackground : PlasmaCore.Types.NoBackground Plasmoid.backgroundHints: PlasmaCore.Types.NoBackground
readonly property bool showingApp: tasksModel.activeTask && tasksModel.activeTask.valid && !tasksModel.data(tasksModel.activeTask, TaskManager.AbstractTasksModel.IsFullScreen)
property QtObject taskSwitcher: taskSwitcherLoader.item ? taskSwitcherLoader.item : null property QtObject taskSwitcher: taskSwitcherLoader.item ? taskSwitcherLoader.item : null
Loader { Loader {
@ -45,6 +47,16 @@ PlasmaCore.ColorScope {
onTriggered: taskSwitcherLoader.source = Qt.resolvedUrl("TaskSwitcher.qml") onTriggered: taskSwitcherLoader.source = Qt.resolvedUrl("TaskSwitcher.qml")
} }
TaskManager.TasksModel {
id: tasksModel
sortMode: TaskManager.TasksModel.SortVirtualDesktop
groupMode: TaskManager.TasksModel.GroupDisabled
screenGeometry: plasmoid.screenGeometry
filterByScreen: plasmoid.configuration.showForCurrentScreenOnly
}
MouseArea { MouseArea {
id: mainMouseArea id: mainMouseArea
anchors.fill: parent anchors.fill: parent
@ -88,12 +100,26 @@ PlasmaCore.ColorScope {
} }
} }
Item {
anchors.fill: parent
visible: plasmoid.configuration.PanelButtonsVisible
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: root.backgroundColor color: root.backgroundColor
opacity: showingApp ? 1 : 0.9
visible: plasmoid.configuration.PanelButtonsVisible Rectangle {
property Item toolBox anchors {
left: parent.left
right: parent.right
top: parent.top
}
height: 1
color: PlasmaCore.ColorScope.textColor
opacity: 0.2
}
}
Button { Button {
anchors.left: parent.left anchors.left: parent.left