adsfolio.gui.icons
Small stroke icons rendered as vectors using each widget’s Qt palette.
- class adsfolio.gui.icons.ActionIconBinder(widget)[source]
Bases:
PySide6.QtCore.QObjectKeep vector icons on actions matched to a widget’s palette.
Qt renders action icons once, so a palette change would leave them in the old colors. The binder renders them again whenever widget changes palette.
- Parameters:
widget (QWidget)
- bind(action, name)[source]
Give action the vector icon name and keep it current.
- Parameters:
action (PySide6.QtGui.QAction)
name (str)
- Return type:
None
- eventFilter(watched, event)[source]
Render action icons again after a palette change.
- Parameters:
watched (PySide6.QtCore.QObject)
event (PySide6.QtCore.QEvent)
- Return type:
- staticMetaObject = PySide6.QtCore.QMetaObject("ActionIconBinder" inherits "QObject": )
- class adsfolio.gui.icons.BadgeToolButton(parent=None)[source]
Bases:
PySide6.QtWidgets.QToolButtonTool button that draws a count badge in its top-right corner.
The badge shows the exact count. Its width is measured from the font, and the button grows just enough that the badge stays over the right half of the icon and never covers the left half. An empty badge draws nothing and leaves the button at its normal size.
- Parameters:
parent (QWidget | None)
- minimumSizeHint()[source]
Return the minimum size, widened only when the badge needs room.
- Return type:
- paintEvent(event)[source]
Draw the button, then the badge in the highlight colors.
- Parameters:
event (Any)
- Return type:
None
- set_badge(count)[source]
Show count in the badge, or hide it when count is None or 0.
- Parameters:
count (int | None)
- Return type:
None
- staticMetaObject = PySide6.QtCore.QMetaObject("BadgeToolButton" inherits "QToolButton": )
- class adsfolio.gui.icons.RoundIconButton(icon_name, label, parent=None)[source]
Bases:
PySide6.QtWidgets.QToolButtonCircular icon-only button with a thin outline.
The label is the tooltip and accessible name, because the button shows no text.
- DIAMETER = 28
- staticMetaObject = PySide6.QtCore.QMetaObject("RoundIconButton" inherits "QToolButton": )
- class adsfolio.gui.icons.VectorIconLabel(name, description, parent=None)[source]
Bases:
PySide6.QtWidgets.QLabelDisplay a vector icon with an accessible name and tooltip.
- paintEvent(event)[source]
Center the icon without rasterizing it at a fixed display scale.
- Parameters:
event (Any)
- Return type:
None
- staticMetaObject = PySide6.QtCore.QMetaObject("VectorIconLabel" inherits "QLabel": )
- adsfolio.gui.icons.vector_icon(name, widget, role=ColorRole.ButtonText)[source]
Render code-generated SVG strokes in the widget’s active and disabled colors.
Native Qt icons contain 1x, 2x, and 3x pixmaps for the shared 16-pixel size. Button icons refresh when their palette changes. No font glyphs are used.
- Parameters:
name (str)
widget (PySide6.QtWidgets.QWidget)
- Return type: