Rename absolute_from_start to translation in scrollable

This commit is contained in:
Héctor Ramón Jiménez 2023-07-12 10:05:46 +02:00
parent ca2afb0495
commit d07bac36ab
No known key found for this signature in database
GPG key ID: 140CC052C94F138E

View file

@ -1058,7 +1058,7 @@ impl Offset {
} }
} }
fn absolute_from_start( fn translation(
self, self,
viewport: f32, viewport: f32,
content: f32, content: f32,
@ -1219,7 +1219,7 @@ impl State {
) -> Vector { ) -> Vector {
Vector::new( Vector::new(
if let Some(horizontal) = direction.horizontal() { if let Some(horizontal) = direction.horizontal() {
self.offset_x.absolute_from_start( self.offset_x.translation(
bounds.width, bounds.width,
content_bounds.width, content_bounds.width,
horizontal.alignment, horizontal.alignment,
@ -1228,7 +1228,7 @@ impl State {
0.0 0.0
}, },
if let Some(vertical) = direction.vertical() { if let Some(vertical) = direction.vertical() {
self.offset_y.absolute_from_start( self.offset_y.translation(
bounds.height, bounds.height,
content_bounds.height, content_bounds.height,
vertical.alignment, vertical.alignment,