Apply cursor styles during paint

This makes the editor's cursor an IBeam and properly deals with nested cursor styles.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
Nathan Sobo 2022-04-22 10:54:09 -06:00
parent 53bf7b61c0
commit 92f040df00
16 changed files with 124 additions and 96 deletions

View file

@ -161,29 +161,25 @@ impl View for GoToLine {
self.max_point.row + 1
);
Align::new(
ConstrainedBox::new(
Container::new(
Flex::new(Axis::Vertical)
.with_child(
Container::new(ChildView::new(&self.line_editor).boxed())
.with_style(theme.input_editor.container)
.boxed(),
)
.with_child(
Container::new(Label::new(label, theme.empty.label.clone()).boxed())
.with_style(theme.empty.container)
.boxed(),
)
.boxed(),
)
.with_style(theme.container)
.boxed(),
ConstrainedBox::new(
Container::new(
Flex::new(Axis::Vertical)
.with_child(
Container::new(ChildView::new(&self.line_editor).boxed())
.with_style(theme.input_editor.container)
.boxed(),
)
.with_child(
Container::new(Label::new(label, theme.empty.label.clone()).boxed())
.with_style(theme.empty.container)
.boxed(),
)
.boxed(),
)
.with_max_width(500.0)
.with_style(theme.container)
.boxed(),
)
.top()
.with_max_width(500.0)
.named("go to line")
}