summaryrefslogtreecommitdiffstats
path: root/native/src/widget/column.rs
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/widget/column.rs')
-rw-r--r--native/src/widget/column.rs21
1 files changed, 14 insertions, 7 deletions
diff --git a/native/src/widget/column.rs b/native/src/widget/column.rs
index 42cfe9b9..e874ad42 100644
--- a/native/src/widget/column.rs
+++ b/native/src/widget/column.rs
@@ -1,18 +1,16 @@
//! Distribute content vertically.
use std::hash::Hash;
+use crate::layout;
+use crate::overlay;
use crate::{
- layout, overlay, Align, Clipboard, Element, Event, Hasher, Layout, Length,
- Point, Widget,
+ Align, Clipboard, Element, Event, Hasher, Layout, Length, Point, Rectangle,
+ Widget,
};
use std::u32;
/// A container that distributes its contents vertically.
-///
-/// A [`Column`] will try to fill the horizontal space of its container.
-///
-/// [`Column`]: struct.Column.html
#[allow(missing_debug_implementations)]
pub struct Column<'a, Message, Renderer> {
spacing: u16,
@@ -185,8 +183,15 @@ where
defaults: &Renderer::Defaults,
layout: Layout<'_>,
cursor_position: Point,
+ viewport: &Rectangle,
) -> Renderer::Output {
- renderer.draw(defaults, &self.children, layout, cursor_position)
+ renderer.draw(
+ defaults,
+ &self.children,
+ layout,
+ cursor_position,
+ viewport,
+ )
}
fn hash_layout(&self, state: &mut Hasher) {
@@ -199,6 +204,7 @@ where
self.max_height.hash(state);
self.align_items.hash(state);
self.spacing.hash(state);
+ self.padding.hash(state);
for child in &self.children {
child.widget.hash_layout(state);
@@ -240,6 +246,7 @@ pub trait Renderer: crate::Renderer + Sized {
content: &[Element<'_, Message, Self>],
layout: Layout<'_>,
cursor_position: Point,
+ viewport: &Rectangle,
) -> Self::Output;
}