Files
nanobot/tui/src/rendering/scrollbox.ts
T
chengyongru f18423800e refactor(tui): organize source by feature boundaries (#5975)
* refactor(tui): group source files by feature

* refactor(tui): split app and gateway responsibilities
2026-09-29 16:57:36 +08:00

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
}
}