* refactor(tui): group source files by feature * refactor(tui): split app and gateway responsibilities
15 lines
606 B
TypeScript
15 lines
606 B
TypeScript
import type { ScrollBoxRenderable } from "@opentui/core"
|
|
|
|
/** Keep scrolling functional without drawing terminal-dependent block glyphs. */
|
|
export function hideScrollbars(scrollBox: ScrollBoxRenderable): void {
|
|
for (const bar of [scrollBox.verticalScrollBar, scrollBox.horizontalScrollBar]) {
|
|
// ScrollBar can make itself visible again when content starts overflowing.
|
|
// Hiding its children as well keeps embedded terminals deterministic.
|
|
bar.visible = false
|
|
bar.showArrows = false
|
|
bar.slider.visible = false
|
|
bar.startArrow.visible = false
|
|
bar.endArrow.visible = false
|
|
}
|
|
}
|