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>
22 lines
735 B
QML
22 lines
735 B
QML
import QtQuick
|
|
import "../../services"
|
|
|
|
// Base for desktop widget faces; DesktopWidget binds these after loading.
|
|
Item {
|
|
id: face
|
|
property string widgetId
|
|
property string kind
|
|
property string variant
|
|
property var options: ({})
|
|
// False while windows cover this widget's desktop: faces pause motion and sampling.
|
|
property bool desktopVisible: true
|
|
// Faces showing live metrics keep the shared collector running only while shown.
|
|
property bool usesMetrics: false
|
|
Demand {
|
|
service: MetricsService
|
|
active: face.usesMetrics && face.desktopVisible
|
|
}
|
|
// Reference size for typography that scales with the widget.
|
|
readonly property real unit: Math.min(width, height * 2)
|
|
}
|