EditorZoom

object EditorZoom

Shared font-size bounds for a Prolog source editor's zoom controls (Ctrl/Cmd +/-/0, Ctrl/Cmd + wheel), so every toolkit (ide-swing's RSyntaxTextArea, ide-web's Ace) agrees on how far zooming is allowed to go, instead of each reimplementing its own (previously drifted: 8-48 vs. 8-40) clamp.

Properties

Link copied to clipboard
const val DEFAULT_FONT_SIZE: Int = 14
Link copied to clipboard
const val MAX_FONT_SIZE: Int = 48
Link copied to clipboard
const val MIN_FONT_SIZE: Int = 8

Functions

Link copied to clipboard
fun clamp(fontSize: Int): Int

Clamps fontSize to the supported MIN_FONT_SIZE..MAX_FONT_SIZE range.