From fc87280dcfed7e0268f6b9c9dc840f83cc1c2a9c Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Fri, 2 May 2025 13:57:16 +1000 Subject: refactor: separate launcher into multiple files --- modules/launcher/Background.qml | 64 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 modules/launcher/Background.qml (limited to 'modules/launcher/Background.qml') diff --git a/modules/launcher/Background.qml b/modules/launcher/Background.qml new file mode 100644 index 0000000..429f12e --- /dev/null +++ b/modules/launcher/Background.qml @@ -0,0 +1,64 @@ +import "root:/config" +import QtQuick +import QtQuick.Shapes + +Shape { + id: root + + required property real realWrapperHeight + readonly property int rounding: Appearance.rounding.large + readonly property int roundingY: Math.min(rounding, realWrapperHeight / 2) + readonly property real wrapperHeight: realWrapperHeight - 1 // Pixel issues :sob: + + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + + preferredRendererType: Shape.CurveRenderer + opacity: Appearance.transparency.enabled ? Appearance.transparency.base : 1 + + ShapePath { + strokeWidth: -1 + fillColor: Appearance.colours.m3surface + + startY: root.wrapperHeight + + PathArc { + relativeX: root.rounding + relativeY: -root.roundingY + radiusX: root.rounding + radiusY: root.roundingY + direction: PathArc.Counterclockwise + } + PathLine { + relativeX: 0 + y: root.roundingY + } + PathArc { + relativeX: root.rounding + relativeY: -root.roundingY + radiusX: root.rounding + radiusY: root.roundingY + } + PathLine { + x: wrapper.width - root.rounding * 2 + } + PathArc { + relativeX: root.rounding + relativeY: root.roundingY + radiusX: root.rounding + radiusY: root.roundingY + } + PathLine { + relativeX: 0 + y: root.wrapperHeight - root.roundingY + } + PathArc { + relativeX: root.rounding + relativeY: root.roundingY + radiusX: root.rounding + radiusY: root.roundingY + direction: PathArc.Counterclockwise + } + } +} -- cgit v1.2.3-freya