diff options
author | 2023-07-12 10:05:46 +0200 | |
---|---|---|
committer | 2023-07-12 10:05:46 +0200 | |
commit | d07bac36ab528ea5c3f4a09bb0ae010ae1b5c6da (patch) | |
tree | e49742886c7300d6ee79753fad3c19a662333a93 /widget/src/scrollable.rs | |
parent | ca2afb04952f177667c4431a102161be9223340f (diff) | |
download | iced-d07bac36ab528ea5c3f4a09bb0ae010ae1b5c6da.tar.gz iced-d07bac36ab528ea5c3f4a09bb0ae010ae1b5c6da.tar.bz2 iced-d07bac36ab528ea5c3f4a09bb0ae010ae1b5c6da.zip |
Rename `absolute_from_start` to `translation` in `scrollable`
Diffstat (limited to 'widget/src/scrollable.rs')
-rw-r--r-- | widget/src/scrollable.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/widget/src/scrollable.rs b/widget/src/scrollable.rs index 45fbd72b..9a43a978 100644 --- a/widget/src/scrollable.rs +++ b/widget/src/scrollable.rs @@ -1058,7 +1058,7 @@ impl Offset { } } - fn absolute_from_start( + fn translation( self, viewport: f32, content: f32, @@ -1219,7 +1219,7 @@ impl State { ) -> Vector { Vector::new( if let Some(horizontal) = direction.horizontal() { - self.offset_x.absolute_from_start( + self.offset_x.translation( bounds.width, content_bounds.width, horizontal.alignment, @@ -1228,7 +1228,7 @@ impl State { 0.0 }, if let Some(vertical) = direction.vertical() { - self.offset_y.absolute_from_start( + self.offset_y.translation( bounds.height, content_bounds.height, vertical.alignment, |