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.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/native/src/widget/column.rs b/native/src/widget/column.rs
index cdcf25af..104790d4 100644
--- a/native/src/widget/column.rs
+++ b/native/src/widget/column.rs
@@ -2,7 +2,8 @@
use std::hash::Hash;
use crate::{
- layout, Align, Element, Event, Hasher, Layout, Length, Point, Widget,
+ layout, Align, Clipboard, Element, Event, Hasher, Layout, Length, Point,
+ Widget,
};
use std::u32;
@@ -32,7 +33,7 @@ impl<'a, Message, Renderer> Column<'a, Message, Renderer> {
Column {
spacing: 0,
padding: 0,
- width: Length::Fill,
+ width: Length::Shrink,
height: Length::Shrink,
max_width: u32::MAX,
max_height: u32::MAX,
@@ -153,15 +154,17 @@ where
cursor_position: Point,
messages: &mut Vec<Message>,
renderer: &Renderer,
+ clipboard: Option<&dyn Clipboard>,
) {
self.children.iter_mut().zip(layout.children()).for_each(
|(child, layout)| {
child.widget.on_event(
- event,
+ event.clone(),
layout,
cursor_position,
messages,
renderer,
+ clipboard,
)
},
);
@@ -170,10 +173,11 @@ where
fn draw(
&self,
renderer: &mut Renderer,
+ defaults: &Renderer::Defaults,
layout: Layout<'_>,
cursor_position: Point,
) -> Renderer::Output {
- renderer.draw(&self.children, layout, cursor_position)
+ renderer.draw(defaults, &self.children, layout, cursor_position)
}
fn hash_layout(&self, state: &mut Hasher) {
@@ -210,6 +214,7 @@ pub trait Renderer: crate::Renderer + Sized {
/// [`Layout`]: ../layout/struct.Layout.html
fn draw<Message>(
&mut self,
+ defaults: &Self::Defaults,
content: &[Element<'_, Message, Self>],
layout: Layout<'_>,
cursor_position: Point,