Expand description
Window splitter arithmetic, ported from upstream’s splitter.ts: clamping and
rounding, what each key does, and how far a drag moves the bar.
Structs§
- KeyContext
- Everything a key press needs to know about the bar.
Enums§
- Split
Unit - The unit a splitter’s value is in.
Functions§
- drag_
value - The value after dragging
deltapixels from where a drag began atstart.per_pixelis 100 divided by the split’s size for a percentage, 1 for pixels. - key_
value - The value a key asks for, and the size to remember for Enter, or
Nonefor keys the splitter leaves alone. Arrows move the bar, not the value: whether that grows the pane depends on which side of the bar it is on, and in RTL Right is the inline start. - settle
- Clamp to the bounds and round: tenths of a percent, whole pixels.