The square markers, block meters and hard-cornered fills read as boxy next to the porthole. The desktop is now soft throughout: the porthole is the shape everything is built around and every smaller surface echoes it. - Theme gains radiusS / radiusM / radiusL. radiusL is frameRadius - padS, so anything inset padS inside one of the frame's curves is concentric with it. - P5Panel and Skew draw rounded rectangles (Geom.roundedRect) whenever they neither lean nor are chopped, which is always now; the polygon path is kept for shapes brought back on purpose. - Markers are dots; workspace pips, toggles, transport and media chips, notification actions and today's date are pills or discs; the slider handle is round. Meters are one continuous rounded line that glides to its level instead of a row of segments. - Album art is rounded with ClippingRectangle in the bar, the media popout and the dashboard. - Free-standing panels (launcher, ask) drop the corner brackets and take the frame radius. - Fix: a hovered notification's wash was a full-bleed square, so in the drawer's bottom corner it ran past the drawer's curve. It is inset by padS/2 and rounded by radiusL, which keeps it inside the curve. Hyprland: the discord special workspace and its window rule are gone, SUPER+S stays the only scratchpad, and SUPER+D now opens the dashboard (it was on SUPER+I). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
49 lines
1.5 KiB
QML
49 lines
1.5 KiB
QML
import QtQuick
|
|
import "root:/config"
|
|
import "root:/components"
|
|
|
|
// A load meter: a soft rounded track with the level filling it from the left.
|
|
// It used to be a row of separate segments; one continuous line reads calmer,
|
|
// and a level that glides reads as a quantity rather than as a count.
|
|
//
|
|
// `segments`, `segmentWidth` and `spacing` are accepted and ignored, so the
|
|
// call sites that still size a segmented meter do not have to be chased down.
|
|
Item {
|
|
id: root
|
|
|
|
property real value: 0 // 0..100
|
|
property int segments: 14
|
|
property real segmentWidth: 4
|
|
property real spacing: 3
|
|
property color activeColor: Theme.heat(value)
|
|
property color idleColor: Theme.alpha(Theme.outline, 0.35)
|
|
property real lean: Theme.skew
|
|
|
|
implicitWidth: segments * segmentWidth + (segments - 1) * spacing
|
|
implicitHeight: 4
|
|
|
|
readonly property real fraction: Math.max(0, Math.min(100, root.value)) / 100
|
|
|
|
Rectangle {
|
|
anchors.fill: parent
|
|
radius: height / 2
|
|
color: root.idleColor
|
|
}
|
|
|
|
Rectangle {
|
|
height: parent.height
|
|
// Never narrower than its own height, so a near-zero level is a dot
|
|
// rather than a sliver.
|
|
width: root.fraction > 0 ? Math.max(height, parent.width * root.fraction) : 0
|
|
radius: height / 2
|
|
color: root.activeColor
|
|
|
|
Behavior on width {
|
|
NumberAnimation { duration: Theme.durSlow; easing.type: Easing.OutCubic }
|
|
}
|
|
Behavior on color {
|
|
ColorAnimation { duration: Theme.durBase }
|
|
}
|
|
}
|
|
}
|