summaryrefslogtreecommitdiffstats
path: root/widget/src/scrollable.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-09-10 00:34:21 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-09-10 00:34:21 +0200
commitb8e5693a3089d728b4f8d4b3b0b7197202ebd732 (patch)
tree79a9f84f9920525657fbe03d53ce33bab09053d7 /widget/src/scrollable.rs
parent956512338905bac0b156fdaf16fe3c3e07e97a84 (diff)
parenta3489e4af960388e9f73988b88df361022a654a4 (diff)
downloadiced-b8e5693a3089d728b4f8d4b3b0b7197202ebd732.tar.gz
iced-b8e5693a3089d728b4f8d4b3b0b7197202ebd732.tar.bz2
iced-b8e5693a3089d728b4f8d4b3b0b7197202ebd732.zip
Merge branch 'master' into explicit-text-caching
Diffstat (limited to 'widget/src/scrollable.rs')
-rw-r--r--widget/src/scrollable.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/widget/src/scrollable.rs b/widget/src/scrollable.rs
index 5decfd9d..def28821 100644
--- a/widget/src/scrollable.rs
+++ b/widget/src/scrollable.rs
@@ -1151,6 +1151,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 {