Radish alpha
r
rad:z39mP9rQAaGmERfUMPULfPUi473tY
Radicle terminal user interface
Radicle
Git
Use scrollbar instead of numeric display
Closed { reason: Solved } did:key:z6MkswQE...2C1V opened 1 year ago p:later

Scollable widgets (for now: tables, trees and textareas) should display a scrollbar instead of emitting their scroll state, which is then rendered in footers etc.

E.g. table:

let [table_area, scrollbar_area] =
    Layout::horizontal([Constraint::Min(1), Constraint::Length(2)]).areas(render.area);

frame.render_stateful_widget(rows, table_area, &mut self.state);

let scrollbar = Scrollbar::new(ScrollbarOrientation::VerticalRight);
let mut scrollbar_state =
    ScrollbarState::new(props.items.len()).position(self.state.offset());

frame.render_stateful_widget(scrollbar, scrollbar_area, &mut scrollbar_state);