Render borders in gpui2 divs

This commit is contained in:
Nathan Sobo
2023-09-06 14:31:44 -06:00
parent 5a778fbde6
commit 46451f2a8b
4 changed files with 90 additions and 11 deletions
+1
View File
@@ -73,6 +73,7 @@ impl<V: 'static> Element<V> for Div<V> {
for child in &mut self.children {
child.paint(view, layout.bounds.origin(), cx);
}
style.paint_foreground(layout.bounds, cx);
if pop_text_style {
cx.pop_text_style();
}
+9
View File
@@ -477,6 +477,15 @@ pub trait StyleHelpers: Styleable<Style = Style> {
self
}
fn border_color<C>(mut self, border_color: C) -> Self
where
C: Into<Hsla>,
Self: Sized,
{
self.declared_style().border_color = Some(border_color.into());
self
}
fn text_color<C>(mut self, color: C) -> Self
where
C: Into<Hsla>,