module

Cresium::LayoutConfig

Terminal-size-dependent display rules, shared by App and the screen views. Pure predicates over a Tui::Rect — no state of its own.

Constants

LAP_COMPACT_WIDTH_THRESHOLD = 80
LARGE_MIN_HEIGHT = 40
LARGE_MIN_WIDTH = 160

Terminal size at/above which digits switch to Digits::LARGE_GLYPHS.

MILLIS_MIN_WIDTH = 40

The millisecond format (mm:ss.fff, 90 columns) doesn't fit an 80x25 VGA terminal — auto-switches to mm:ss when width is too narrow, on top of the explicit --no-ms flag.

MIN_HEIGHT = 25
MIN_WIDTH = 80

VGA text mode (80x25) is the smallest resolution we support.

Class methods

compact_laps?(rect : Tui::Rect) : Bool

True when rect is too narrow to show lap times at full width.

Source
large_digits?(rect : Tui::Rect) : Bool

True when rect is big enough to use the large digit glyphs.

Source
show_millis?(rect : Tui::Rect, flag : Bool) : Bool

Whether milliseconds should actually be shown: flag (the --no-ms setting) AND enough width to fit them.

Source
too_small?(rect : Tui::Rect) : Bool

True when rect is below the minimum supported terminal size.

Source