if the shadow image isn't found, use a svg
This commit is contained in:
parent
413053b9b6
commit
94405dd7fb
@ -219,6 +219,29 @@ Item {
|
|||||||
orientation: Qt.Horizontal
|
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 for page containers.
|
||||||
Component {
|
Component {
|
||||||
id: containerComponent
|
id: containerComponent
|
||||||
@ -300,6 +323,13 @@ Item {
|
|||||||
easing.type: Easing.InOutQuad
|
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
|
// Sets pending state as current if state change is delayed
|
||||||
|
Loading…
Reference in New Issue
Block a user