Skip to main content

Module box_chrome

Module box_chrome 

Source
Expand description

Shared box-drawing primitives for bordered UI components (text entry, selector).

Constants§

BORDER_ROWS
Number of border rows in a box (top border + bottom border).
CHROME_WIDTH
Total columns consumed by border chrome: “│ “ + “ │” = 4.
CONTENT_OFFSET
Columns consumed by the left border before content starts (“│ “ = 2).
CORNER_BOTTOM_LEFT
CORNER_BOTTOM_RIGHT
CORNER_TOP_LEFT
CORNER_TOP_RIGHT
HORIZONTAL
INNER_PADDING
Space padding inside the vertical bars (one space each side).
VERTICAL

Functions§

bottom_border
Plain bottom border: ╰──────╯
snap_even
Snap a width to the nearest even number, using min_width when rounding would collapse a nonzero value to zero. Used during partial-open animation so the box stays symmetric as it grows.
top_border
Plain top border: ╭──────╮