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:
15 files changed
+405
-254
No files matched your search
+2
-2
@@ -10,6 +10,7 @@ use crate::{
|
||||
buttons::{Button, ButtonVariant, CopyButton, IconButton},
|
||||
editor::code_colors,
|
||||
forms::Run,
|
||||
layout::on_axis,
|
||||
primitives::{Disclosure, IconName},
|
||||
theme::{ActiveTheme, ControlSize, Radius, TextSize},
|
||||
};
|
||||
@@ -128,8 +129,7 @@ impl RenderOnce for CodeBlock {
|
||||
.child(CopyButton::new((self.id.clone(), "copy"), code.clone())),
|
||||
)
|
||||
.child(
|
||||
div()
|
||||
.id((self.id.clone(), "code"))
|
||||
on_axis(div().id((self.id.clone(), "code")))
|
||||
.overflow_x_scroll()
|
||||
.px_3()
|
||||
.py_2()
|
||||
|
||||
Reference in new issue
Block a user