jdxi_editor.ui.text_size

Preferences › Text size: Normal, Large, Larger, for the text only.

The editor’s style sheets write their sizes by hand (font-size: 11px) in many places. Rather than change each, with a size above Normal every style sheet set on a widget goes through scale_style(): sizes below MIN_PX are raised, and all sizes are multiplied by the chosen scale. Knobs, graphs and spacing keep their size. The application font and the LCD text are scaled the same way. At Normal nothing changes. It applies from the next start.

JDXI_TEXT_SIZE (100, 112, 125) overrides the setting (screenshots).

From JD-Xi Studio 82d8c075.

Attributes

SETTING

SIZES

MIN_PX

_FONT_PX

_FONT_PT

_installed

Functions

scale() → float

The chosen text size as a factor (1.0 at Normal).

px(size) → int

A text size in px: at least MIN_PX, times the scale.

scale_style(css) → str

The style sheet with its text sizes raised and scaled.

install(app) → None

From now on every style sheet set on a widget or on the app has its text

Module Contents

jdxi_editor.ui.text_size.SETTING = 'ui/text_size'[source]
jdxi_editor.ui.text_size.SIZES[source]
jdxi_editor.ui.text_size.MIN_PX = 12[source]
jdxi_editor.ui.text_size._FONT_PX[source]
jdxi_editor.ui.text_size._FONT_PT[source]
jdxi_editor.ui.text_size.scale() → float[source]

The chosen text size as a factor (1.0 at Normal).

jdxi_editor.ui.text_size.px(size: float) → int[source]

A text size in px: at least MIN_PX, times the scale.

Tiny sizes (below 7 px) are not text but tricks (an invisible label, a dot): they stay.

jdxi_editor.ui.text_size.scale_style(css: str) → str[source]

The style sheet with its text sizes raised and scaled.

jdxi_editor.ui.text_size._installed = False[source]
jdxi_editor.ui.text_size.install(app) → None[source]

From now on every style sheet set on a widget or on the app has its text scaled, and the application font is scaled. Nothing at Normal.