jdxi_editor.ui.windows.skin.editor
Make a skin of your own without writing a file by hand: start from any skin,
change its colours, sizes, meters and lanes, see it in a live preview, and
save it as a user skin (~/.jdxi_editor/skins/<id>.toml, see
jdxi_editor.ui.style.user_skins), which joins the JDXiSkin menu.
The window edits the skin file’s tables directly, the same tables a file holds. A field left alone is inherited from the skin it is based on, and is not written; a field you change is written, and its reset button (↺) takes it out again. Parts the form does not show – named colours, gradients, a decoration’s sizes – are kept as they are when an existing file is opened and saved.
The colours of the panel’s decorations (rules, step buttons, a keyboard) and of the cheeks’ and rail’s details (patch cords, grilles, cables) are offered too. A file can only replace such a list, not change one item of it, so the first colour changed writes the inherited list out whole; its ↺ takes the whole list out again.
Attributes
Classes
A swatch with its "#RRGGBB"; clicking it picks another colour. |
|
A few characters on a screen in the skin's display palette. |
|
A panel wearing the skin being edited, with lettering and a display. |
|
Edit a user skin's tables with a live preview, and save them to a file. |
Functions
|
The colours of a decoration or detail: (path, label, rgba) each. |
|
"Rule (top)": what a decoration or detail is, and where. |
|
"#RRGGBB" from a QColor, an RGBA tuple or text. |
Module Contents
- jdxi_editor.ui.windows.skin.editor.DETAIL_LISTS = [('face', 'decorations', 'Panel decorations'), ('face', 'overlays', 'Panel overlays'), ('ear',...[source]
- jdxi_editor.ui.windows.skin.editor.detail_slots(item: Any) List[Tuple[Tuple[Any, ...], str, Any]][source]
The colours of a decoration or detail: (path, label, rgba) each.
- jdxi_editor.ui.windows.skin.editor.detail_title(item: Any) str[source]
“Rule (top)”: what a decoration or detail is, and where.
- jdxi_editor.ui.windows.skin.editor.SIZE_FIELDS = [('ear_width', 'Cheek width', 40), ('bezel', 'Bezel', 20), ('rail_height', 'Rail height', 30)][source]
- jdxi_editor.ui.windows.skin.editor._hex(color: Any) str[source]
“#RRGGBB” from a QColor, an RGBA tuple or text.
- class jdxi_editor.ui.windows.skin.editor.ColorButton(parent: PySide6.QtWidgets.QWidget | None = None)[source]
Bases:
PySide6.QtWidgets.QPushButtonA swatch with its “#RRGGBB”; clicking it picks another colour.
- class jdxi_editor.ui.windows.skin.editor.LcdSample(parent: PySide6.QtWidgets.QWidget | None = None)[source]
Bases:
PySide6.QtWidgets.QWidgetA few characters on a screen in the skin’s display palette.
- class jdxi_editor.ui.windows.skin.editor.SkinPreview(parent: PySide6.QtWidgets.QWidget | None = None)[source]
Bases:
PySide6.QtWidgets.QWidgetA panel wearing the skin being edited, with lettering and a display.
- class jdxi_editor.ui.windows.skin.editor.SkinEditorWindow(parent: PySide6.QtWidgets.QWidget | None = None, wear: Callable[[picoui.skin.Skin, bool], None] | None = None, saved: Callable[[picoui.skin.Skin], None] | None = None, folder: pathlib.Path | None = None)[source]
Bases:
PySide6.QtWidgets.QMainWindowEdit a user skin’s tables with a live preview, and save them to a file.
- Parameters:
parent – the main window
wear – called with (skin, remember) to put a skin on the editor
saved – called with the skin once it is saved and offered
folder – where user skins are saved;
USER_SKIN_DIRif None
- _path: pathlib.Path | None = None[source]
- _row(key: Tuple[str, str], widget: PySide6.QtWidgets.QWidget) PySide6.QtWidgets.QWidget[source]
A field and its reset button.
- _details_group() PySide6.QtWidgets.QGroupBox[source]
The colours of the panel’s decorations and the cheeks’ and rail’s details; its rows are made to fit the skin (see
_fill_details()).
- open_file(path: pathlib.Path) None[source]
Edit the skin in
path.
- _detail_edited(slot: DetailSlot, color: str) None[source]
A decoration’s or detail’s colour changed. A list inherited from the skin it is based on is written out whole first, as a file can only replace a list, then the one colour is changed in it.
- _build(refresh_form: bool = False) None[source]
Make the skin from the tables; show it, or say what is wrong.
- _refresh_form(skin: picoui.skin.Skin | None) None[source]
Show the skin’s values: changed ones bold, inherited ones plain.
- _fill_details(skin: picoui.skin.Skin) None[source]
A row per colour of each decoration and detail the skin has, under a heading per list; remade only when the skin’s lists change shape.
- static _fill_stops(buttons: List[ColorButton], material, fallback: str, checked: bool) None[source]
The repaint colours: the current gradient’s, else the body’s shades.
- save() pathlib.Path | None[source]
Save the skin, offer it, and wear it; returns the file, or None.