feat(quickshell): cap the rail's open chamfers and trace between them
A chamfer with no neighbour behind it now carries the corner it removed, put back OUTSIDE the panel as a detached accent triangle. capGap is the perpendicular distance from the cut, hence the per-axis shift of capGap over root 2: the cap moves along the cut's normal, not along an axis. The trace joining two caps belongs to the RAIL, not the panel — the run it draws is the gap BETWEEN two panels, which no panel can see. HyprChromeBar filters the row down to panels (a slack Item has no `rightChamfer`, so spacers drop out, and dropping them is exactly what makes a trace span them), then joins each right cap to the next left cap: straight, one 45° step at the midpoint of the gap, straight. It meets the middle of each cap's outward face rather than its tip. TestPanel is a staging slot between two spacers. It counts seconds since load, which is the cheapest proof the panel is live, and standing alone it exercises a cap and a trace at both ends — something a rail of butted panels never does. Restructures the module in the same commit, since the moves and the edits above land in the same files: folders are PascalCase, the bar and its widgets moved under Widgets/Bar, and DebugWindow takes the HyprChrome Theme instead of the legacy one. The two singletons are identical today, so that is not a visual fix — it is a palette edit reaching the debug stage in future. Rename detection needs -M40% to follow HyprChromeBar, which grew past the default similarity threshold. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U19X5LGTxtq4pb4jdNVivv
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import qs.HyprChrome.Theme
|
||||
import qs.HyprChrome.Widgets.Bar.Panels
|
||||
|
||||
// Staging slot for whatever is being worked on, sized to itself so it can be
|
||||
// dropped anywhere in the rail without a width. It counts seconds since the
|
||||
// shell loaded, which is the cheapest thing that proves the panel is live and
|
||||
// not a still frame — a reload visibly restarts it.
|
||||
//
|
||||
// It also stands ALONE between two spacers, so it is the pair of caps and
|
||||
// traces that a rail of butted panels never exercises: a right cap joining the
|
||||
// next panel's left cap across a gap, twice over.
|
||||
BarPanel {
|
||||
id: test
|
||||
|
||||
panelId: "TST"
|
||||
title: "TEST"
|
||||
meta: "STAGE"
|
||||
|
||||
property int seconds: 0
|
||||
|
||||
// Sized to its content, like the tray: a staging panel has no business
|
||||
// reserving a share of the rail.
|
||||
implicitWidth: Math.max(test.headerMinWidth,
|
||||
test.briefLeft + brief.implicitWidth + test.padding,
|
||||
test.padding * 2 + body.implicitWidth)
|
||||
|
||||
Timer {
|
||||
interval: 1000
|
||||
running: true
|
||||
repeat: true
|
||||
onTriggered: test.seconds++
|
||||
}
|
||||
|
||||
summary: Text {
|
||||
id: brief
|
||||
|
||||
text: "T+" + test.seconds
|
||||
color: Theme.accent
|
||||
font.family: Theme.displayFont
|
||||
font.pixelSize: 13
|
||||
font.bold: true
|
||||
}
|
||||
|
||||
Column {
|
||||
id: body
|
||||
|
||||
spacing: 2
|
||||
|
||||
Text {
|
||||
text: "T+" + test.seconds
|
||||
color: Theme.text
|
||||
font.family: Theme.displayFont
|
||||
font.pixelSize: 17
|
||||
font.bold: true
|
||||
font.letterSpacing: 1
|
||||
}
|
||||
|
||||
Text {
|
||||
text: "SECONDS SINCE LOAD"
|
||||
color: Theme.muted
|
||||
font.family: Theme.microFont
|
||||
font.pixelSize: 9
|
||||
font.letterSpacing: 1.4
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user