Skip to content

Commit 469fe25

Browse files
authored
Don't make Scroll bigger than its child on the non-scrolling axis. (#1198)
1 parent 7793d4d commit 469fe25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

druid/src/widget/scroll.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ impl<T: Data, W: Widget<T>> Widget<T> for Scroll<T, W> {
143143
self.child
144144
.set_layout_rect(ctx, data, env, child_size.to_rect());
145145

146-
let self_size = bc.constrain(max_bc);
146+
let self_size = bc.constrain(child_size);
147147
let _ = self.scroll_component.scroll(Vec2::new(0.0, 0.0), self_size);
148148
self_size
149149
}

0 commit comments

Comments
 (0)