Files
mxandClaude Opus 5.5 bf0ef09cec Share demand counting and jump easing; split Settings sidebar
Add services/Demand.qml, which holds one count on a service's demand
counter while active. It replaces 13 hand-written consumer counters
across the bar, Control Center, dashboard, media and desktop widgets.
The desktop Cava widget now releases Cava while its desktop is covered.

Add components/JumpValue.qml for the "animate only visible jumps" rule
shared by the dashboard gauge and resource bars.

Move the Settings sidebar (search and navigation) into
settings/SettingsSidebar.qml and the drag handle into
settings/controls/SettingsDragArea.qml, halving Settings.qml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 22:42:56 +02:00

27 lines
730 B
QML

import QtQuick
import "../theme"
// Follows `target`, easing only visible jumps (at least `threshold`); smaller
// changes snap. Easing every small sample change kept windows rendering at the
// display's refresh rate.
QtObject {
id: root
property real target
property real threshold: 2
property int duration: Theme.duration * 2
property real value
property bool animate: false
onTargetChanged: {
animate = Math.abs(target - value) >= threshold;
value = target;
}
Component.onCompleted: value = target
Behavior on value {
enabled: root.animate
NumberAnimation {
duration: root.duration
easing.type: Easing.OutCubic
}
}
}