Skip to content

fontlabapp.anchors.panel.model · declarations 001

Back to fontlabapp.anchors.panel.model

ERROR_COLOR module-attribute

ERROR_COLOR

MAX_ROWS module-attribute

MAX_ROWS

ink

ink() -> Any

Return a QBrush for item text, from the main window WindowText.

FontLab's palette Text can be pale in item views, so the brush uses WindowText of fontlab.MainWindow().

panel_type

panel_type() -> type

Return the AnchorPanel base class (a PythonQt QDialog).

The class loads PythonQt, so call this inside FontLab only. Subclass it, set TITLE, KEY, ACTION and HEADERS, and fill in the hooks build_controls and planner; optionally chosen_masters, glyph_names and on_reload. See fontlabapp.anchors.panel.ui.AnchorPanel for the full contract. Show it with scripting.show_script_dialog(Subclass, Subclass.KEY).

readable_palette

readable_palette(widget: Any) -> None

Give widget a readable Text colour in each colour group.

For the Active and Inactive groups, keep whichever of Text and WindowText differs more in lightness from Base, then set the palette on the widget.