jdxi_editor.ui.widgets.switch.lit_button

Lit Button

A checkable button that lights like a JD-Xi panel button: dark when off, filled with the illuminated red (with a soft glow) when on.

Example

>>> button = LitButton("ON")          
>>> button.setChecked(True)           # lit, even with signals blocked

Attributes

GLOW_RADIUS

Classes

LitButton

Checkable panel-style button with an LED-like lit state.

Module Contents

jdxi_editor.ui.widgets.switch.lit_button.GLOW_RADIUS = 16[source]
class jdxi_editor.ui.widgets.switch.lit_button.LitButton(text: str, parent: PySide6.QtWidgets.QWidget | None = None, color: str | None = None)[source]

Bases: PySide6.QtWidgets.QPushButton

Checkable panel-style button with an LED-like lit state.

_color = '#E04435'[source]
static stylesheet(color: str) → str[source]
checkStateSet() → None[source]

setChecked() from code (also with signals blocked): update the glow.

nextCheckState() → None[source]

A click: update the glow.

is_lit() → bool[source]
_update_glow() → None[source]