spacr.qt.widgets.dot_link¶
Shared custom-painted documentation-dot button.
Classes¶
Small circular link with a generous, accessible hit area. |
Module Contents¶
- class spacr.qt.widgets.dot_link.DotLink(*, tooltip: str, colours: Tuple[str, str, str, str], accessible_description: str, parent=None)[source]¶
Bases:
PySide6.QtWidgets.QToolButtonSmall circular link with a generous, accessible hit area.
The dot painted is 7 px, which is far below any usable hit target, so the BUTTON is sized for the pointer and only its painting is small.
NOTHING IN THE APPLICATION CONSTRUCTS ONE, and that is deliberate rather than an oversight: the information dots were taken off the settings surfaces, and several tests asserting they stayed off do it by looking for this type. The class is the sentinel those tests need, so it is kept and not wired up.
- Parameters:
tooltip – the hover text. Also used as the accessible NAME, since a dot has no label a screen reader could otherwise announce.
colours – the four states to paint, as
(normal, hover, pressed, disabled).accessible_description – what the link does, for a screen reader – the longer form of
tooltip.parent – parent widget.
Build a small coloured dot that acts as a link.
- Parameters:
tooltip – hover text.
colours – the four states, as
(rest, hover, pressed, disabled).accessible_description – what the dot is, for assistive technology – the mark itself says nothing readable.
parent – parent widget, or
None.