Skip to content

Commit

Permalink
Rename absolute_from_start to translation in scrollable
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Jul 12, 2023
1 parent ca2afb0 commit d07bac3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions widget/src/scrollable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ impl Offset {
}
}

fn absolute_from_start(
fn translation(
self,
viewport: f32,
content: f32,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit d07bac3

Please sign in to comment.