summaryrefslogtreecommitdiffstats
path: root/graphics/src
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2021-05-04 13:03:43 +0700
committerLibravatar GitHub <noreply@github.com>2021-05-04 13:03:43 +0700
commit6b4bf34bf94eed091eb89efa1bbb14e6bc68883e (patch)
tree9e3512c9b8890dfe364817b78366af571482318a /graphics/src
parent4b8ba8309f6645cdcb5bd605f8dd88097f8ee5a7 (diff)
parent59c2500c55430ac715b846017f79ad93a58fc3a5 (diff)
downloadiced-6b4bf34bf94eed091eb89efa1bbb14e6bc68883e.tar.gz
iced-6b4bf34bf94eed091eb89efa1bbb14e6bc68883e.tar.bz2
iced-6b4bf34bf94eed091eb89efa1bbb14e6bc68883e.zip
Merge pull request #851 from hecrj/fix/scrollbar-under-content
Fix `Scrollable` scrollbar being rendered behind contents
Diffstat (limited to 'graphics/src')
-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