Files
dotfiles/quickshell/popouts/PopoutSurface.qml
T
nvrlandClaude Opus 5.5 196abc2311 feat(quickshell): popouts grow out of the frame
Hover panels used to float a gap away from their trigger as free-standing
cards. They are now part of the hull: flush against the frame edge they
open from, painted in the hull colour, joined to it through concave
fillets, with the porthole rim carried round their open side, and they
slide out from behind the frame instead of fading and scaling in.

Popout places itself rather than relying on the compositor's slide
adjustment. A panel is centred on its trigger and, if that lands it near
one of the opening's corners, docked into the corner — attached to the
bar and the rail at once — so it never leaves a thin strip of opening
between itself and the rail. The calendar, network and audio panels dock
top-right; notifications dock bottom-right.

PopoutSurface leaves fill, border and corner ticks to the hull when it is
inside a Popout, and keeps them in the launcher and the ask panel. Its
attached fill opacity is 0 rather than a transparent colour, because
P5Panel re-applies fillOpacity to the colour and turned "transparent"
into 97% black.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 20:34:17 +02:00

31 lines
1.2 KiB
QML

import QtQuick
import "root:/config"
import "root:/components"
// The slab every popout sits on. Pure preset — it declares no children of its
// own, so P5Panel's default content property stays usable by callers.
P5Panel {
property color tone: Theme.primary
property bool textured: false
// Inside a Popout the panel is part of the hull, which paints the fill
// and the rim itself; the surface only lays out the content. Elsewhere —
// the launcher, the ask panel — it is a free-standing panel of its own.
readonly property bool attached: parent?.frameAttached ?? false
fill: attached ? "transparent" : Theme.mantle
// Zero, not a transparent fill: P5Panel re-applies this opacity to the
// fill colour, which turned "transparent" into 97% black.
fillOpacity: attached ? 0 : 0.97
// The frame is structure: a neutral hairline. The tone goes into the
// corner ticks, which is where NieR puts the one bright mark on a panel.
border: Theme.surfaceAlt
borderWidth: attached ? 0 : Theme.stroke
halftone: textured
halftoneColor: tone
halftoneOpacity: 0.06
ticks: !attached
tickColor: tone
padding: Theme.padM
}