Checkpoint
This commit is contained in:
@@ -88,7 +88,7 @@ impl<V: 'static> Element<V> for Div<V> {
|
||||
// TODO: Support only one dimension being hidden
|
||||
let mut pop_layer = false;
|
||||
if style.overflow.y != Overflow::Visible || style.overflow.x != Overflow::Visible {
|
||||
cx.scene.push_layer(Some(bounds));
|
||||
cx.scene().push_layer(Some(bounds));
|
||||
pop_layer = true;
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ impl<V: 'static> Element<V> for Div<V> {
|
||||
}
|
||||
|
||||
if pop_layer {
|
||||
cx.scene.pop_layer();
|
||||
cx.scene().pop_layer();
|
||||
}
|
||||
|
||||
style.paint_foreground(bounds, cx);
|
||||
@@ -221,7 +221,7 @@ impl<V: 'static> Div<V> {
|
||||
let hovered = bounds.contains_point(cx.mouse_position());
|
||||
if hovered {
|
||||
let rem_size = cx.rem_size();
|
||||
cx.scene.push_quad(scene::Quad {
|
||||
cx.scene().push_quad(scene::Quad {
|
||||
bounds,
|
||||
background: Some(hsla(0., 0., 1., 0.05).into()),
|
||||
border: gpui::Border {
|
||||
|
||||
@@ -70,7 +70,7 @@ impl<V: 'static> Element<V> for Img {
|
||||
.and_then(ResultExt::log_err)
|
||||
{
|
||||
let rem_size = cx.rem_size();
|
||||
cx.scene.push_image(scene::Image {
|
||||
cx.scene().push_image(scene::Image {
|
||||
bounds,
|
||||
border: gpui::Border {
|
||||
color: style.border_color.unwrap_or_default().into(),
|
||||
|
||||
@@ -63,7 +63,7 @@ impl<V: 'static> Element<V> for Svg {
|
||||
color: Rgba::from(fill_color).into(),
|
||||
};
|
||||
|
||||
cx.scene.push_icon(icon);
|
||||
cx.scene().push_icon(icon);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,13 +92,7 @@ impl<V: 'static> Element<V> for Text {
|
||||
|
||||
// TODO: We haven't added visible bounds to the new element system yet, so this is a placeholder.
|
||||
let visible_bounds = bounds;
|
||||
line.paint(
|
||||
cx.scene,
|
||||
bounds.origin(),
|
||||
visible_bounds,
|
||||
line_height,
|
||||
cx.legacy_cx,
|
||||
);
|
||||
line.paint(bounds.origin(), visible_bounds, line_height, cx.legacy_cx);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user