Render header blocks as horizontall fixed (like the gutter)

Tweak editor layout to perform horizontal autoscroll before
laying out the blocks, so that they can access the scroll position.
This commit is contained in:
Max Brunsfeld
2022-01-25 17:19:38 -08:00
parent f19934096a
commit a890787923
3 changed files with 62 additions and 69 deletions
@@ -69,6 +69,7 @@ where
pub struct BlockContext<'a> {
pub cx: &'a AppContext,
pub anchor_x: f32,
pub scroll_x: f32,
pub gutter_width: f32,
pub gutter_padding: f32,
pub em_width: f32,
@@ -951,6 +952,7 @@ mod tests {
cx,
anchor_x: 0.,
gutter_padding: 0.,
scroll_x: 0.,
gutter_width: 0.,
line_height: 0.,
em_width: 0.,