Skip to main content

Module zoom

Module zoom 

Source
Expand description

The interface zoom, owned by egui-pop: a setting (appearance.interface_zoom, one value for every window, in fixed steps so each step’s glyphs are rasterised once) and commands to move it, bound by default to Ctrl+Alt+=, Ctrl+Alt+- and Ctrl+Alt+0 and rebindable like any command. egui’s own zoom keys (Ctrl and +, -, 0) are turned off: they would fire with an application’s content zoom.

Steps (ADR 0011): interface.zoom ({ "from", "to" }, the factors), whose default sets the setting. Signal: scale.changed on the journal ({ "viewport", "from", "to" }, pixels per point) whenever a window’s scale changes, from the zoom or from a move to another screen.

Constants§

CMD_ZOOM_IN
CMD_ZOOM_OUT
CMD_ZOOM_RESET
SETTING_ZOOM
The setting: the zoom as a percentage among the steps ("100%").
STEP_ZOOM
The step changing the zoom.

Functions§

current
The zoom the setting asks for.
label
A step’s label: "125%".
parse
The factor of a label ("125%" → 1.25).
set
Asks for a zoom, through the interface.zoom step.