spacr.qt.widgets.usage_bar

UsageBar — labeled slim progress bar for RAM/GPU/CPU indicators.

Module Contents

class spacr.qt.widgets.usage_bar.UsageBar(label: str, parent=None)[source]

Bases: PySide6.QtWidgets.QWidget

Labeled thin progress bar with a right-aligned percent readout.

Parameters:

label – text shown to the left of the bar (e.g. “RAM”, “GPU”).

set_value(pct: float) None[source]

Set the bar value, clamped to 0-100, and re-color at 75/90 %.

Parameters:

pct – value in 0.0-100.0; out-of-range values clamp.