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

BODY_COLOR

BODY_GRAIN

BODY_PROPERTY

FLAT_PROPERTY

SHEEN_PROPERTY

SHEEN_SLICE

SHEEN_SLICE_BOTTOM

SHEEN_SLICE_TOP

CHASSIS_MARKER

PANEL_MARKER

PANEL_BASE

PANEL_HEADING_BASE

PANEL_HEADING_ALT

HEADING_PADDING

GLOSS_GRADIENT

_gloss_panel_file

EditorStyle

Classes

AppEditorStyle

Design tokens + chrome stylesheet for all editors.

Functions

_icon_file(name, color[, size]) → str

A qtawesome icon saved as PNG, for stylesheet image: url(...).

in_panel_heading_background_ink(base[, alt]) → str

base, as a section heading in the active skin's colours.

panel_heading_background_ink(widget, base[, alt]) → None

Make widget a section heading in the active skin's colours.

in_panel_ink(base) → str

base, lettered in the active skin's panel ink.

panel_ink(widget, base) → None

Letter widget with base in the active skin's ink, and remember how.

panel_rules() → str

The faceplate's chrome: transparent, and lettered in the active skin's ink.

body_texture(width, height[, seed, color])

QImage of the matte body: color (the active skin's) with fine grain.

_body_grain_file([size, color]) → str

A tile of the body texture as PNG, for stylesheet background-image.

mark_editor_body(widget) → None

Paint widget (an editor's root) with the matte body finish.

gloss_panel_file([width, height]) → str

The active skin's faceplate as PNG, for stylesheet border-image on editor

chassis_rules() → str

Everything in the chrome that belongs to the active skin: the body the

mark_sheen_panels(editor) → None

Give editor's outermost panels (tab panes and groups not inside another

mark_sheen(widget) → None

Give widget (a QGroupBox or QTabWidget panel) the Instrument window's glossy sheen.

mark_flat(widget) → None

Draw the groups inside widget (nested in a glossy panel) flat on that

_jdxi_slider_rules([analog]) → str

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.BODY_COLOR = '#2C2C2C'[source]
jdxi_editor.ui.style.editor_style.BODY_GRAIN = 7[source]
jdxi_editor.ui.style.editor_style.BODY_PROPERTY = 'jdxiBody'[source]
jdxi_editor.ui.style.editor_style.FLAT_PROPERTY = 'jdxiFlat'[source]
jdxi_editor.ui.style.editor_style.SHEEN_PROPERTY = 'jdxiSheen'[source]
jdxi_editor.ui.style.editor_style.SHEEN_SLICE = 3[source]
jdxi_editor.ui.style.editor_style.SHEEN_SLICE_BOTTOM = 6[source]
jdxi_editor.ui.style.editor_style.SHEEN_SLICE_TOP = 5[source]
jdxi_editor.ui.style.editor_style.CHASSIS_MARKER = '/* chassis lettering */'[source]
jdxi_editor.ui.style.editor_style.PANEL_MARKER = '/* panel lettering */'[source]
jdxi_editor.ui.style.editor_style.PANEL_BASE = 'jdxiPanelBase'[source]
jdxi_editor.ui.style.editor_style.PANEL_HEADING_BASE = 'jdxiPanelHeadingBase'[source]
jdxi_editor.ui.style.editor_style.PANEL_HEADING_ALT = 'jdxiPanelHeadingAlt'[source]
jdxi_editor.ui.style.editor_style.HEADING_PADDING = '1px 6px'[source]
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 color wins, 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._gloss_panel_file[source]
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.

class jdxi_editor.ui.style.editor_style.AppEditorStyle[source]

Design tokens + chrome stylesheet for all editors.

BACKGROUND = '#151515'[source]
SURFACE = '#202020'[source]
SURFACE_ALT = '#292929'[source]
BORDER = '#383838'[source]
BORDER_HOVER = '#555555'[source]
METALLIC_RED = '#A71920'[source]
ACCENT = '#E04435'[source]
ACCENT_HOVER = '#F05A5A'[source]
BORDER_ACTIVE = '#E04435'[source]
LCD_ORANGE = '#FF6A00'[source]
LCD_ORANGE_DIM = '#CC5500'[source]
LCD_BG_EDGE = '#1A0A0A'[source]
LCD_BG_MID = '#331111'[source]
LCD_BG_GLOW = '#551100'[source]
TEXT = '#E6E6E6'[source]
TEXT_SECONDARY = '#999999'[source]
FONT_PANEL = '12px'[source]
FONT_TRACK_NAME = '12px'[source]
FONT_TRACK_SECONDARY = '10px'[source]
FONT_CONTROL = '11px'[source]
FONT_RULER = '10px'[source]
FONT_STATUS = '11px'[source]
MARGINS[source]
SPACING_GROUP = 14[source]
PANEL_PADDING = 12[source]
classmethod editor_stylesheet(*, accent: str | None = None) → str[source]

Restrained editor chrome.

GroupBoxes are JD-Xi sections: centred title over one rule, in the accent. accent tints focus/hover/checked only (e.g. Analog cyan).

jdxi_editor.ui.style.editor_style.EditorStyle[source]