From 3699efaed5cda6567b02abe949979a53d3820f3a Mon Sep 17 00:00:00 2001 From: Pier Luigi Fiorini Date: Thu, 23 Oct 2014 22:59:03 +0200 Subject: [PATCH] Refactor layers and switch z-index between home and applications --- compositor/contents/Compositor.qml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/compositor/contents/Compositor.qml b/compositor/contents/Compositor.qml index 37c24801..0eda0231 100644 --- a/compositor/contents/Compositor.qml +++ b/compositor/contents/Compositor.qml @@ -22,6 +22,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore import "WindowManagement.js" as WindowManagement Rectangle { + property bool showHome: true readonly property alias layers: layers readonly property real topBarHeight: units.iconSizes.small @@ -39,22 +40,23 @@ Rectangle { onSurfaceDestroyed: WindowManagement.surfaceDestroyed(surface) } - Item { + QtObject { readonly property alias desktop: desktopLayer readonly property alias windows: windowsLayer id: layers + } + + Item { + id: desktopLayer anchors.fill: parent + z: showHome ? 2 : 1 + } - Item { - id: desktopLayer - anchors.fill: parent - } - - Item { - id: windowsLayer - anchors.fill: parent - anchors.topMargin: topBarHeight - } + Item { + id: windowsLayer + anchors.fill: parent + anchors.topMargin: topBarHeight + z: showHome ? 1 : 2 } }