summaryrefslogtreecommitdiffstats
path: root/graphics/src/widget/scrollable.rs
diff options
context:
space:
mode:
authorLibravatar Aaron Housh <Dispersia@users.noreply.github.com>2021-05-19 07:14:26 -0700
committerLibravatar Aaron Housh <Dispersia@users.noreply.github.com>2021-05-19 07:14:26 -0700
commitae484429d30a3360893d030a17e52caa4164a052 (patch)
tree4bfe30d3b46c7e30170e0b495d9a4dd1a2a1825f /graphics/src/widget/scrollable.rs
parentcf6af4c2560f5996bc533402ac3e4289c0c94702 (diff)
parent3918257883dba3cf260bd9764cb7b34101c435e6 (diff)
downloadiced-ae484429d30a3360893d030a17e52caa4164a052.tar.gz
iced-ae484429d30a3360893d030a17e52caa4164a052.tar.bz2
iced-ae484429d30a3360893d030a17e52caa4164a052.zip
Merge branch 'hecrj:master' into upgrade-wgpu
Diffstat (limited to 'graphics/src/widget/scrollable.rs')
-rw-r--r--graphics/src/widget/scrollable.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/graphics/src/widget/scrollable.rs b/graphics/src/widget/scrollable.rs
index 57065ba2..2220e4b8 100644
--- a/graphics/src/widget/scrollable.rs
+++ b/graphics/src/widget/scrollable.rs
@@ -134,8 +134,16 @@ where
Primitive::None
};
+ let scroll = Primitive::Clip {
+ bounds,
+ offset: Vector::new(0, 0),
+ content: Box::new(Primitive::Group {
+ primitives: vec![scrollbar, scroller],
+ }),
+ };
+
Primitive::Group {
- primitives: vec![clip, scrollbar, scroller],
+ primitives: vec![clip, scroll],
}
} else {
content