From 94405dd7fb2ae88eb04eb9beeb4582585246f3e4 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 9 Aug 2012 10:56:54 +0200 Subject: [PATCH] if the shadow image isn't found, use a svg --- .../plasmaextracomponents/qml/PageRow.qml | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/declarativeimports/plasmaextracomponents/qml/PageRow.qml b/declarativeimports/plasmaextracomponents/qml/PageRow.qml index 9d32ece5c..578a4d14e 100644 --- a/declarativeimports/plasmaextracomponents/qml/PageRow.qml +++ b/declarativeimports/plasmaextracomponents/qml/PageRow.qml @@ -219,6 +219,29 @@ Item { orientation: Qt.Horizontal } + Component { + id: svgShadowComponent + PlasmaCore.SvgItem { + property Item container + z: 800 + svg: PlasmaCore.Svg {imagePath: "widgets/scrollwidget"} + elementId: "border-left" + width: naturalSize.width + opacity: container.pageDepth == actualRoot.depth ? 1 : 0.7 + anchors { + left: container.pageParent.right + top: container.pageParent.top + bottom: container.pageParent.bottom + } + Behavior on opacity { + NumberAnimation { + duration: transitionDuration + easing.type: Easing.InOutQuad + } + } + } + } + // Component for page containers. Component { id: containerComponent @@ -300,6 +323,13 @@ Item { easing.type: Easing.InOutQuad } } + onStatusChanged: { + if (status == Image.Error) { + var shadow = svgShadowComponent.createObject(container) + shadow.container = container + destroy() + } + } } // Sets pending state as current if state change is delayed