forked from kent/consciousness
scroll_pane: extract scroll state from chat.rs
New ScrollPaneState centralizes height caching, scroll offset, pin-to-bottom, visible range computation, and screen-to-item coordinate mapping. Replaces the hand-rolled scroll bookkeeping that was duplicated across draw_conversation_pane and draw_pane. -170 lines from chat.rs. The scroll_pane module also includes a ScrollPane StatefulWidget ready to wire up for the next step: collapsing the draw functions into render_stateful_widget calls. Co-Authored-By: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
parent
3fb367acef
commit
ceaa66e30d
3 changed files with 442 additions and 170 deletions
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
pub(crate) mod chat;
|
||||
mod context;
|
||||
pub(crate) mod scroll_pane;
|
||||
mod subconscious;
|
||||
mod unconscious;
|
||||
mod thalamus;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue