Tables: focused headers scroll into view; long tables scroll sideways

A sortable header is a tracked Tab stop; once focused it sets its
table's sideways offset whole from its painted bounds and asks one
frame. The virtualized branch scrolls sideways too, and its list
keeps a plain wheel to its rows. layout::on_axis keeps a scroll box's
wheel to its axes; tables, code blocks, the thumbnail strip and the
gallery's page use it. Footer figures move to tables/foot.rs; the
profiler's ruler takes theme.chart().label. HumanInputRequest's
answered state gets a test.
This commit is contained in:
ZacharyZhang-NY committed 2026-09-26 12:00:27 -04:00
1 parent a29cc8bc45
commit 1f1166fef0
15 files changed
+405 -254

No files matched your search

+6
View File
@@ -16,6 +16,12 @@ use crate::{motion, theme::ActiveTheme};
const IDLE: Duration = Duration::from_millis(900);
/// Keeps a scroll box's wheel to its own axes; gpui turns a wheel along the other axis onto a box that scrolls one way, while the page scrolls too.
pub fn on_axis<E: Styled>(mut element: E) -> E {
element.style().restrict_scroll_to_axis = Some(true);
element
}
struct Activity {
handle: ScrollHandle,
last: Point<Pixels>,