Initial commit of the Quickshell desktop suite: bar, dock, launcher, settings, Control Center, dashboard, OSD, lock screen, desktop widgets, plugin host with the vendored Noctalia/Omarchy compatibility layer, helpers, packaging, tests and phase documentation. Includes the optimization work so far: usage widgets and dashboard gauges no longer animate continuously, desktop widgets pause while covered, system controls stop flickering on background polls, dock app matching uses an indexed catalog, and workspace ghosts are created only for occupied slots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
55 lines
2.6 KiB
QML
55 lines
2.6 KiB
QML
import QtQuick
|
|
import QtQuick.Shapes
|
|
import qs.compat.omarchy.Commons
|
|
import "../Commons/BorderGeometry.js" as Geometry
|
|
|
|
// Visual-only border renderer. It draws closed side-run contours, or a
|
|
// compound winding path for all four sides, so asymmetric/gradient borders
|
|
// do not require touching odd-even paths. Flat uniform borders use Rectangle.border.
|
|
Item {
|
|
id: root
|
|
|
|
property var borderSpec: Border.none()
|
|
property real radius: 0
|
|
|
|
readonly property var _widths: borderSpec && borderSpec.widths ? borderSpec.widths : Geometry.parseWidthSpec(0, 0)
|
|
readonly property bool hasBorder: Geometry.maxWidth(_widths) > 0
|
|
readonly property var _gradient: borderSpec && borderSpec.gradient ? borderSpec.gradient : ({ colors: [], angle: 0, enabled: false })
|
|
readonly property var _colors: _gradient.enabled ? _gradient.colors : [Border.color(borderSpec), Border.color(borderSpec)]
|
|
readonly property var _endpoints: Geometry.gradientEndpoints(width, height, _gradient.angle || 0)
|
|
readonly property string _path: Geometry.ringPath(width, height, radius, _widths)
|
|
|
|
visible: hasBorder && width > 0 && height > 0
|
|
anchors.fill: parent
|
|
z: 100000
|
|
|
|
Shape {
|
|
anchors.fill: parent
|
|
preferredRendererType: Shape.CurveRenderer
|
|
|
|
ShapePath {
|
|
fillRule: ShapePath.WindingFill
|
|
strokeWidth: 0
|
|
fillGradient: LinearGradient {
|
|
x1: root._endpoints.x1
|
|
y1: root._endpoints.y1
|
|
x2: root._endpoints.x2
|
|
y2: root._endpoints.y2
|
|
|
|
GradientStop { position: Geometry.stopPosition(root._colors, 0); color: Geometry.stopColor(root._colors, 0) }
|
|
GradientStop { position: Geometry.stopPosition(root._colors, 1); color: Geometry.stopColor(root._colors, 1) }
|
|
GradientStop { position: Geometry.stopPosition(root._colors, 2); color: Geometry.stopColor(root._colors, 2) }
|
|
GradientStop { position: Geometry.stopPosition(root._colors, 3); color: Geometry.stopColor(root._colors, 3) }
|
|
GradientStop { position: Geometry.stopPosition(root._colors, 4); color: Geometry.stopColor(root._colors, 4) }
|
|
GradientStop { position: Geometry.stopPosition(root._colors, 5); color: Geometry.stopColor(root._colors, 5) }
|
|
GradientStop { position: Geometry.stopPosition(root._colors, 6); color: Geometry.stopColor(root._colors, 6) }
|
|
GradientStop { position: Geometry.stopPosition(root._colors, 7); color: Geometry.stopColor(root._colors, 7) }
|
|
GradientStop { position: Geometry.stopPosition(root._colors, 8); color: Geometry.stopColor(root._colors, 8) }
|
|
GradientStop { position: Geometry.stopPosition(root._colors, 9); color: Geometry.stopColor(root._colors, 9) }
|
|
}
|
|
|
|
PathSvg { path: root._path }
|
|
}
|
|
}
|
|
}
|