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>
This commit is contained in:
1 parent
99e64a7713
commit
bf0ef09cec
18 files changed
+595
-570
No files matched your search
@@ -0,0 +1,23 @@
|
||||
import QtQuick
|
||||
|
||||
// Holds one count on a service's demand counter while `active`, released when
|
||||
// inactive or destroyed. Services run their samplers and processes only while
|
||||
// counted, so idle views cost nothing.
|
||||
QtObject {
|
||||
id: root
|
||||
required property var service
|
||||
property string counter: "consumers"
|
||||
property bool active: true
|
||||
property bool held: false
|
||||
function sync() {
|
||||
const next = active && !!service;
|
||||
if (next === held)
|
||||
return;
|
||||
service[counter] += next ? 1 : -1;
|
||||
held = next;
|
||||
}
|
||||
onActiveChanged: sync()
|
||||
Component.onCompleted: sync()
|
||||
Component.onDestruction: if (held)
|
||||
service[counter]--
|
||||
}
|
||||
@@ -3,6 +3,7 @@ singleton TrayService 1.0 TrayService.qml
|
||||
singleton ApplicationsService 1.0 ApplicationsService.qml
|
||||
singleton HyprlandService 1.0 HyprlandService.qml
|
||||
ProviderJob 1.0 ProviderJob.qml
|
||||
Demand 1.0 Demand.qml
|
||||
singleton WallpaperService 1.0 WallpaperService.qml
|
||||
singleton MediaService 1.0 MediaService.qml
|
||||
singleton CavaService 1.0 CavaService.qml
|
||||
|
||||
Reference in new issue
Block a user