jdxi_editor.ui.style.editor_style
Shared restrained editor chrome (UI_CRITIQUE).
Grey idle borders and soft sliders; accent only for focus / active states. Used app-wide via Theme.apply_editor_style; MidiPlayer/Pattern subclass this.
Attributes
Classes
Design tokens + chrome stylesheet for all editors. |
Functions
|
A qtawesome icon saved as PNG, for stylesheet |
|
base, as a section heading in the active skin's colours. |
|
Make widget a section heading in the active skin's colours. |
|
base, lettered in the active skin's panel ink. |
|
Letter widget with base in the active skin's ink, and remember how. |
|
The faceplate's chrome: transparent, and lettered in the active skin's ink. |
|
QImage of the matte body: color (the active skin's) with fine grain. |
|
A tile of the body texture as PNG, for stylesheet background-image. |
|
Paint widget (an editor's root) with the matte body finish. |
|
The active skin's faceplate as PNG, for stylesheet border-image on editor |
|
Everything in the chrome that belongs to the active skin: the body the |
|
Give editor's outermost panels (tab panes and groups not inside another |
|
Give widget (a QGroupBox or QTabWidget panel) the Instrument window's glossy sheen. |
|
Draw the groups inside widget (nested in a glossy panel) flat on that |
|
The one slider look (both orientations): black handle with a neon border, |
Module Contents
- jdxi_editor.ui.style.editor_style._icon_file(name: str, color: str, size: int = 12) str[source]
A qtawesome icon saved as PNG, for stylesheet
image: url(...).Style sheets can only use image files; this draws the icon once per run (needs a QApplication) into the temp folder.
- jdxi_editor.ui.style.editor_style.in_panel_heading_background_ink(base: str, alt: bool = False) str[source]
base, as a section heading in the active skin’s colours.
The Juno-106 names each section in white reversed out of a coloured bar; the JD-Xi prints its headings straight on the panel. A skin that gives no heading background is therefore left exactly as it was, and the headings stay whatever their own style says.
Both colours are appended rather than substituted: these styles are plain declaration blocks, so the last declaration wins, whichever the style named.
- Parameters:
base – str the style as written
alt – bool the skin’s second bar rather than its first
- Returns:
str
- jdxi_editor.ui.style.editor_style.panel_heading_background_ink(widget: QWidget, base: str, alt: bool = False) None[source]
Make widget a section heading in the active skin’s colours.
- Parameters:
widget – QWidget a heading on the faceplate
base – str the style it would otherwise have been given
alt – bool the skin’s second bar rather than its first
- Returns:
None
- jdxi_editor.ui.style.editor_style.in_panel_ink(base: str) str[source]
base, lettered in the active skin’s panel ink.
The colour is appended rather than replaced: these styles are plain declaration blocks, so the last
colorwins, whichever the style named.- Parameters:
base – str the style as written
- Returns:
str
- jdxi_editor.ui.style.editor_style.panel_ink(widget: QWidget, base: str) None[source]
Letter widget with base in the active skin’s ink, and remember how.
- Parameters:
widget – QWidget a label on the faceplate
base – str the style it would otherwise have been given
- Returns:
None
- jdxi_editor.ui.style.editor_style.panel_rules() str[source]
The faceplate’s chrome: transparent, and lettered in the active skin’s ink.
The legends on the instrument panel used to be the JD-Xi’s red whatever skin was chosen, because the colour was written into the stylesheet rather than taken from the skin. Red lettering is the JD-Xi’s own mark; on the Juno’s slate panel the legends are white, and its red belongs to the bar behind a section name.
Only the lettering follows the skin here. The buttons’ border and hover keep the accent they had, which each skin already sets as its chassis accent.
- Returns:
str stylesheet rules, led by
PANEL_MARKER
- jdxi_editor.ui.style.editor_style.GLOSS_GRADIENT = 'qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #161618, stop:0.5 #0A0A0B, stop:1 #050506)'[source]
- jdxi_editor.ui.style.editor_style.body_texture(width: int, height: int, seed: int = 7, color: str | None = None)[source]
QImage of the matte body: color (the active skin’s) with fine grain.
- Parameters:
width – int image width
height – int image height
seed – int grain seed, so the body is the same every run
color – Optional[str] body colour; the active skin’s when omitted
- jdxi_editor.ui.style.editor_style._body_grain_file(size: int = 128, color: str | None = None) str[source]
A tile of the body texture as PNG, for stylesheet background-image.
- Parameters:
size – int tile size in px
color – Optional[str] body colour; the active skin’s when omitted
- jdxi_editor.ui.style.editor_style.mark_editor_body(widget) None[source]
Paint widget (an editor’s root) with the matte body finish.
- jdxi_editor.ui.style.editor_style.gloss_panel_file(width: int = 1000, height: int = 420) str[source]
The active skin’s faceplate as PNG, for stylesheet border-image on editor panels.
The default skin is the Instrument window’s glossy panel (gradient, diagonal sheen, rim and top highlight), so this is unchanged until another skin is chosen; see
jdxi_editor.ui.style.rack_skin.
- jdxi_editor.ui.style.editor_style.chassis_rules() str[source]
Everything in the chrome that belongs to the active skin: the body the editors are mounted on, the tabs standing on it, and the lettering printed on the faceplate.
These are gathered in one trailing block, after the rules they override, for two reasons. Changing skin can then rewrite the block wholesale instead of trying to substitute colours in place, which would also catch the controls; and it keeps the skin’s reach in one readable place.
Only labels and group text take the faceplate’s lettering: tabs, fields and lists are control surfaces standing on the panel, and keep dark backgrounds with light text whatever the chassis is made of. A pale skin therefore needs this rather than an inverted palette.
A skin that prints ink legends (the brushed plate) also overrides the section rule and title here, which are otherwise the accent. One that mounts its controls shades idle buttons as caps and combo boxes as wells. Checked and focused states are left alone, so a lamp stays red.
- Returns:
str stylesheet rules, led by
CHASSIS_MARKER
- jdxi_editor.ui.style.editor_style.mark_sheen_panels(editor) None[source]
Give editor’s outermost panels (tab panes and groups not inside another one) the Instrument window’s glossy sheen. Panels inside them keep the plain gradient, so the reflection is not repeated.
- jdxi_editor.ui.style.editor_style.mark_sheen(widget) None[source]
Give widget (a QGroupBox or QTabWidget panel) the Instrument window’s glossy sheen.
- jdxi_editor.ui.style.editor_style.mark_flat(widget) None[source]
Draw the groups inside widget (nested in a glossy panel) flat on that panel, as sections; a tab widget’s pane is drawn flat too.
- jdxi_editor.ui.style.editor_style._jdxi_slider_rules(analog: bool = False) str[source]
The one slider look (both orientations): black handle with a neon border, dark groove, filled part in a neon gradient. Red, or the Analog neon blue.
Vertical rules are the same as JDXiUIStyle.ADSR / ADSR_ANALOG, which the synth sections apply, so every slider of a kind looks alike.