Skip to main content

Crate makeover_tui

Crate makeover_tui 

Source
Expand description

The terminal renderer for makeover_layout.

Named for the target and not for ratatui, the same way makeover-immediate is named for the mode and not for egui.

§What a terminal changes

A terminal can paint a two-tone bevel, which is a surprise: writing cells directly gives per-side colour control that neither Block nor egui’s single bg_stroke offers. What it cannot reliably do is fill. Two surface intents several steps apart in a 24-bit theme routinely land on one entry in sixteen colours, and surface-well collapses onto its own face on 18 of the 31 shipped themes. A well drawn as a fill is then a well drawn as nothing.

So depth here degrades from colour to structure: paint the fill when it will be visible, and always paint the edge, because the edge is the part that survives.

§The correction this renderer forced

makeover_layout::Fill briefly carried a fallback method, returning Page for Well so a consumer without surface-well had something to use. That is an answer for a renderer that can always paint a colour. Here it is actively wrong: page is the surface a well is usually cut into, so falling back to it produces the exact invisibility the fallback was meant to avoid.

Substituting one intent for another is renderer policy, not description. The fallback moved out of the description and into makeover-immediate, where it belongs, which is the first thing a second renderer was built to find.

Structs§

Palette
The resolved colours this renderer needs.

Functions§

frame
Draw a region at a given Depth and return the area left for content.
paint_bevel
Paint a two-tone edge around the outside of area.