Files
z-bar-qt/Modules/Osd/Background.qml
T
Zacharias-Brohn 7d9ba3d570 lockscreen?
2026-02-17 00:28:57 +01:00

62 lines
1.6 KiB
QML

import QtQuick
import QtQuick.Shapes
import qs.Components
import qs.Helpers
import qs.Config
import qs.Modules as Modules
ShapePath {
id: root
required property Wrapper wrapper
readonly property real rounding: 10
readonly property bool flatten: wrapper.width < rounding * 2
readonly property real roundingX: flatten ? wrapper.width / 2 : rounding
strokeWidth: -1
fillColor: DynamicColors.palette.m3surface
PathArc {
relativeX: -root.roundingX
relativeY: root.rounding
radiusX: Math.min(root.rounding, root.wrapper.width)
radiusY: root.rounding
}
PathLine {
relativeX: -(root.wrapper.width - root.roundingX * 3)
relativeY: 0
}
PathArc {
relativeX: -root.roundingX * 2
relativeY: root.rounding * 2
radiusX: Math.min(root.rounding * 2, root.wrapper.width)
radiusY: root.rounding * 2
direction: PathArc.Counterclockwise
}
PathLine {
relativeX: 0
relativeY: root.wrapper.height - root.rounding * 4
}
PathArc {
relativeX: root.roundingX * 2
relativeY: root.rounding * 2
radiusX: Math.min(root.rounding * 2, root.wrapper.width)
radiusY: root.rounding * 2
direction: PathArc.Counterclockwise
}
PathLine {
relativeX: root.wrapper.width - root.roundingX * 3
relativeY: 0
}
PathArc {
relativeX: root.roundingX
relativeY: root.rounding
radiusX: Math.min(root.rounding, root.wrapper.width)
radiusY: root.rounding
}
Behavior on fillColor {
Modules.CAnim {}
}
}