foxes to the top panel effect

This commit is contained in:
Marco Martin 2019-12-11 23:00:38 +01:00
parent 28909aad84
commit 55635e5687
2 changed files with 30 additions and 21 deletions

View file

@ -17,9 +17,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/ *********************************************************************/
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Layouts 1.4
import QtQuick.Window 2.0 import QtQuick.Window 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.plasma.components 3.0 as PlasmaComponents
import org.kde.kwin 2.0 import org.kde.kwin 2.0
PlasmaCore.Dialog { PlasmaCore.Dialog {
@ -28,29 +29,38 @@ PlasmaCore.Dialog {
flags: Qt.X11BypassWindowManagerHint flags: Qt.X11BypassWindowManagerHint
type: PlasmaCore.Dialog.Dock type: PlasmaCore.Dialog.Dock
mainItem: Item { mainItem: MouseArea {
width: workspace.virtualScreenSize.width width: workspace.virtualScreenSize.width
height: units.iconSizes.medium height: units.iconSizes.medium
PlasmaComponents.ToolButton {
anchors.left: parent.left
iconSource: "applications-other"
onClicked: root.showWindowList();
}
PlasmaComponents.ToolButton {
anchors.horizontalCenter: parent.horizontalCenter
iconSource: "go-home"
onClicked: {
root.closeWindowList();
workspace.slotToggleShowDesktop();
}
}
PlasmaComponents.ToolButton {
anchors.right: parent.right RowLayout {
iconSource: "window-close" anchors.fill: parent
enabled: workspace.activeClient PlasmaComponents.ToolButton {
onClicked: workspace.activeClient.closeWindow(); Layout.fillWidth: true
Layout.fillHeight: true
icon.name: "applications-other"
onClicked: root.showWindowList();
}
PlasmaComponents.ToolButton {
Layout.fillWidth: true
Layout.fillHeight: true
icon.name: "go-home"
onClicked: {
root.closeWindowList();
workspace.slotToggleShowDesktop();
}
}
PlasmaComponents.ToolButton {
Layout.fillWidth: true
Layout.fillHeight: true
icon.name: "window-close"
enabled: workspace.activeClient
onClicked: workspace.activeClient.closeWindow();
}
} }
} }
Component.onCompleted: { Component.onCompleted: {

View file

@ -104,7 +104,6 @@ PlasmaCore.Dialog {
anchors.fill: parent anchors.fill: parent
//parentWindow: dialog.windowId //parentWindow: dialog.windowId
client: model.client client: model.client
brightness: (model.client == workspace.activeClient) ? 1.0 : 0.6
} }
onClicked: { onClicked: {
workspace.activeClient = model.client workspace.activeClient = model.client