Skip to content

Commit b8667c9

Browse files
authored
Reinstate the Scroll::scroll function. (#1196)
1 parent d195e45 commit b8667c9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

druid/src/widget/scroll.rs

+7
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,13 @@ impl<T, W: Widget<T>> Scroll<T, W> {
9292
pub fn offset(&self) -> Vec2 {
9393
self.scroll_component.scroll_offset
9494
}
95+
96+
/// Scroll `delta` units.
97+
///
98+
/// Returns `true` if the scroll offset has changed.
99+
pub fn scroll(&mut self, delta: Vec2, layout_size: Size) -> bool {
100+
self.scroll_component.scroll(delta, layout_size)
101+
}
95102
}
96103

97104
impl<T: Data, W: Widget<T>> Widget<T> for Scroll<T, W> {

0 commit comments

Comments
 (0)