import QtQuick import Weave.Templates as T T.BoxShadow { id: box BorderImage { x: box.position === T.BoxShadow.Outset ? (-box.blurRadius * 2) - box.spreadRadius + box.offsetX : 0 y: box.position === T.BoxShadow.Outset ? (-box.blurRadius * 2) - box.spreadRadius + box.offsetY : 0 width: box.width + (box.position === T.BoxShadow.Outset ? (box.blurRadius * 4) + (box.spreadRadius * 2) : 0) height: box.height + (box.position === T.BoxShadow.Outset ? (box.blurRadius * 4) + (box.spreadRadius * 2) : 0) border { left: (box.blurRadius * 2) + Math.max( box.blurRadius, Math.max(box.spreadRadius + box.topLeftRadius, box.spreadRadius + box.bottomLeftRadius) + Math.max(0, -box.offsetX)) right: (box.blurRadius * 2) + Math.max( box.blurRadius, Math.max(box.spreadRadius + box.topRightRadius, box.spreadRadius + box.bottomRightRadius) + Math.max(0, box.offsetX)) top: (box.blurRadius * 2) + Math.max( box.blurRadius, Math.max(box.spreadRadius + box.topLeftRadius, box.spreadRadius + box.topRightRadius) + Math.max(0, -box.offsetY)) bottom: (box.blurRadius * 2) + Math.max( box.blurRadius, Math.max(box.spreadRadius + box.bottomLeftRadius, box.spreadRadius + box.bottomRightRadius) + Math.max(0, box.offsetY)) } horizontalTileMode: BorderImage.Stretch verticalTileMode: BorderImage.Stretch source: box.imageSource } }