import QtQuick import Weave.Controls import Weave.Templates as T T.Surface { id: surfaceId implicitWidth: implicitContentWidth + leftPadding + rightPadding implicitHeight: implicitContentHeight + topPadding + bottomPadding background: Rectangle { id: backgroundId color: { if (surfaceId.level >= 350) { Theme.component.surface._350.backgroundColor } else if (surfaceId.level >= 300) { Theme.component.surface._300.backgroundColor } else if (surfaceId.level >= 250) { Theme.component.surface._250.backgroundColor } else if (surfaceId.level >= 200) { Theme.component.surface._200.backgroundColor } else { Theme.component.surface._100.backgroundColor } } BoxShadow { width: backgroundId.width height: backgroundId.height source: surfaceId.elevation === T.Surface.Low ? Theme.component.surface.low.boxShadow : Theme.component.surface.high.boxShadow } } }