Add channels panel with stubbed out information

co-authored-by: nate <nate@zed.dev>
This commit is contained in:
Mikayla Maki 2023-07-18 18:55:54 -07:00
parent e6f3e0ab9c
commit ac35dae66e
No known key found for this signature in database
17 changed files with 784 additions and 34 deletions

View file

@ -22,6 +22,7 @@ pub struct Flex<V: View> {
children: Vec<AnyElement<V>>,
scroll_state: Option<(ElementStateHandle<Rc<ScrollState>>, usize)>,
child_alignment: f32,
spacing: f32,
}
impl<V: View> Flex<V> {
@ -31,6 +32,7 @@ impl<V: View> Flex<V> {
children: Default::default(),
scroll_state: None,
child_alignment: -1.,
spacing: 0.,
}
}
@ -42,6 +44,11 @@ impl<V: View> Flex<V> {
Self::new(Axis::Vertical)
}
pub fn with_spacing(mut self, spacing: f32) -> Self {
self.spacing = spacing;
self
}
/// Render children centered relative to the cross-axis of the parent flex.
///
/// If this is a flex row, children will be centered vertically. If this is a