theme: soften the YoRHa shapes; SUPER+D opens the dashboard
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>
This commit is contained in:
1 parent
d6de04eaaf
commit
a8c19961e2
24 files changed
+188
-110
No files matched your search
@@ -3,9 +3,10 @@ pragma Singleton
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
|
||||
// Polygon maths for panel shapes. Under the YoRHa theme nothing leans and
|
||||
// nothing is chopped (Theme.skew and Theme.cut are 0), so these collapse to
|
||||
// plain rectangles; they are kept so a shape can be brought back on purpose.
|
||||
// Shape maths for panels. Under the YoRHa theme nothing leans and nothing is
|
||||
// chopped (Theme.skew and Theme.cut are 0); surfaces are rounded rectangles
|
||||
// (roundedRect). The polygon helpers are kept so a shape can be brought back
|
||||
// on purpose.
|
||||
// Originally the Persona 5 panel language: everything leans, and corners
|
||||
// get chopped rather than rounded.
|
||||
Singleton {
|
||||
@@ -89,6 +90,25 @@ Singleton {
|
||||
return root.closed(out);
|
||||
}
|
||||
|
||||
// A polygon as an SVG path string, for PathSvg.
|
||||
function svg(pts: var): string {
|
||||
if (pts.length === 0) return "";
|
||||
let d = `M ${pts[0].x} ${pts[0].y}`;
|
||||
for (let i = 1; i < pts.length; i++) d += ` L ${pts[i].x} ${pts[i].y}`;
|
||||
return d + " Z";
|
||||
}
|
||||
|
||||
// A w x h rectangle with every corner rounded by `r`, clamped so a short
|
||||
// piece becomes a pill rather than folding over itself.
|
||||
function roundedRect(w: real, h: real, r: real): string {
|
||||
const k = Math.max(0, Math.min(r, w / 2, h / 2));
|
||||
if (k <= 0) return root.svg([Qt.point(0, 0), Qt.point(w, 0), Qt.point(w, h), Qt.point(0, h)]);
|
||||
return `M ${k} 0 H ${w - k} A ${k} ${k} 0 0 1 ${w} ${k}`
|
||||
+ ` V ${h - k} A ${k} ${k} 0 0 1 ${w - k} ${h}`
|
||||
+ ` H ${k} A ${k} ${k} 0 0 1 0 ${h - k}`
|
||||
+ ` V ${k} A ${k} ${k} 0 0 1 ${k} 0 Z`;
|
||||
}
|
||||
|
||||
function closed(pts: var): var {
|
||||
if (pts.length === 0) return pts;
|
||||
const out = pts.slice();
|
||||
|
||||
Reference in new issue
Block a user