A machine without a GPU, like most VMs, renders through llvmpipe on the CPU, where every animated frame and every translucent window costs. In a VM, opening and closing a terminal took ~5s of CPU; a panel ~3.4s. omarchy toggle animations (also under Toggle > Animations) places a Hyprland flag that turns off animations, blur and shadows and makes windows opaque. The shell follows Hyprland's animations:enabled, rereading it on every config reload: its one-shot animations run for Style.duration(ms), which is then 0, and its spinners, pulses and title marquee hold still. A new install in a VM starts with the flag in place. Measured in the ISO test VM (llvmpipe), CPU per interaction: terminal open+close 5000ms -> 481ms, workspace switch 1670ms -> 409ms, audio panel 3446ms -> 796ms, volume OSD 2324ms -> 584ms, menu 2028ms -> 1241ms. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
42 lines
1.5 KiB
QML
42 lines
1.5 KiB
QML
import QtQuick
|
|
import qs.Commons
|
|
|
|
// Shared visual chrome for keyboard-and-mouse-navigable items inside a panel.
|
|
// Contract: items must NOT read `containsMouse` for color/border. Mouse
|
|
// hover updates the panel's cursor state at the root; visuals derive from
|
|
// `hasCursor` / `current`. That's what guarantees a single highlight on
|
|
// screen at any time across both keyboard and mouse interaction.
|
|
//
|
|
// Cursor paint is always the shared hover-cursor fill plus optional
|
|
// hover-cursor border. `outline` remains as a compatibility flag for
|
|
// callers that used to request border-only rows, but slider rows still
|
|
// receive the same hover-cursor background as every other row.
|
|
BorderSurface {
|
|
id: root
|
|
|
|
property bool hasCursor: false
|
|
property bool current: false
|
|
property bool outline: false
|
|
property bool bordered: false
|
|
|
|
property color foreground: Color.foreground
|
|
property color accent: Color.accent
|
|
property color fill: Style.hoverFillFor(foreground, accent)
|
|
property color currentFill: Style.selectedFillFor(foreground, accent)
|
|
|
|
radius: Style.cornerRadius
|
|
|
|
color: hasCursor ? fill : (current ? currentFill : "transparent")
|
|
borderSpec: root.hasCursor
|
|
? Border.controlSpec("hover-cursor", root.foreground, root.accent)
|
|
: (root.current
|
|
? Border.controlSpec("selected", root.foreground, root.accent)
|
|
: (root.bordered
|
|
? Border.controlSpec("normal", root.foreground, root.accent)
|
|
: Border.none()))
|
|
|
|
Behavior on color {
|
|
ColorAnimation { duration: Style.duration(60) }
|
|
}
|
|
}
|