Skip to content

Commit

Permalink
Move bounds/content_bounds after relative_offset as per feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
dtzxporter committed Sep 7, 2023
1 parent 1690537 commit 009a621
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions widget/src/scrollable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1137,16 +1137,6 @@ impl Viewport {
}
}

/// Returns the bounds of the current [`Viewport`].
pub fn bounds(&self) -> Rectangle {
self.bounds
}

/// Returns the content bounds of the current [`Viewport`].
pub fn content_bounds(&self) -> Rectangle {
self.content_bounds
}

/// Returns the [`RelativeOffset`] of the current [`Viewport`].
pub fn relative_offset(&self) -> RelativeOffset {
let AbsoluteOffset { x, y } = self.absolute_offset();
Expand All @@ -1156,6 +1146,16 @@ impl Viewport {

RelativeOffset { x, y }
}

/// Returns the bounds of the current [`Viewport`].
pub fn bounds(&self) -> Rectangle {
self.bounds
}

/// Returns the content bounds of the current [`Viewport`].
pub fn content_bounds(&self) -> Rectangle {
self.content_bounds
}
}

impl State {
Expand Down

0 comments on commit 009a621

Please sign in to comment.