jdxi_editor.ui.text_size ======================== .. py:module:: jdxi_editor.ui.text_size .. autoapi-nested-parse:: 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 :func:`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 ---------- .. autoapisummary:: jdxi_editor.ui.text_size.SETTING jdxi_editor.ui.text_size.SIZES jdxi_editor.ui.text_size.MIN_PX jdxi_editor.ui.text_size._FONT_PX jdxi_editor.ui.text_size._FONT_PT jdxi_editor.ui.text_size._installed Functions --------- .. autoapisummary:: jdxi_editor.ui.text_size.scale jdxi_editor.ui.text_size.px jdxi_editor.ui.text_size.scale_style jdxi_editor.ui.text_size.install Module Contents --------------- .. py:data:: SETTING :value: 'ui/text_size' .. py:data:: SIZES .. py:data:: MIN_PX :value: 12 .. py:data:: _FONT_PX .. py:data:: _FONT_PT .. py:function:: scale() -> float The chosen text size as a factor (1.0 at Normal). .. py:function:: px(size: float) -> int 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. .. py:function:: scale_style(css: str) -> str The style sheet with its text sizes raised and scaled. .. py:data:: _installed :value: False .. py:function:: install(app) -> None 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.